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
EXAWOLT Offline
Member

Posts: 113
Threads: 14
Joined: Apr 2012
Reputation: 3
#1
damage

hey again, anyone know how to use this script?
void GivePlayerDamage(float afAmount, string& asType, bool abSpinHead, bool abLethal);

Reduces the health of the player.

afAmount - amount of damage done to health
asType - plays a certain effect on the screen when the damage is dealt (BloodSplat, Claws or Slash)
abSpinHead - changes the camera view when damage is dealt
abLethal - set to true if player can die from given damage

i dont know what to type

simply nuff said




07-02-2012, 11:18 PM
Find
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
EXAWOLT Offline
Member

Posts: 113
Threads: 14
Joined: Apr 2012
Reputation: 3
#3
RE: damage

it worked perfectly, tanks m8 Big Grin

simply nuff said




07-02-2012, 11:32 PM
Find




Users browsing this thread: 1 Guest(s)