Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
damage
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: damage

(Note, player's maximum health is 100.0f)

afAmount
- A float (decimal) value used to determine how much damage is given to the player

asType - A string ("string") that determines screen/sound affect that will accompany the damage; different screen effects have different blood patterns that appear on the screen

abSpinHead - a Boolean (true/false) value that determines whether or not the player's head will spin (make a jerking motion) when the damage is received

abLethal - a Boolean (true/false) value that decides whether or not the player will instantly die from the damage, regardless of the float value/how much the player has left.

so, an example could be:

void ugondie()
{
GivePlayerDamage(25.0f, "Claws", false, false);
}

This function will cause 25 damage, have 3 diagonal streaks of blood across the screen, the player's head won't move, and it won't be fatal.

Hope that helped!

I rate it 3 memes.
07-02-2012, 11:25 PM
Find


Messages In This Thread
damage - by EXAWOLT - 07-02-2012, 11:18 PM
RE: damage - by Adny - 07-02-2012, 11:25 PM
RE: damage - by EXAWOLT - 07-02-2012, 11:32 PM



Users browsing this thread: 1 Guest(s)