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
Give yourself damage the damage
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#5
RE: Give yourself damage the damage

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 guess this is what you want:
GivePlayerDamage(100, "BloodSplat", true, true);

There are tons of script tutorials for monster events where you walk somewhere and it spawns the monster. Now with this just replace the monster related things with that giveplaer damage and youre fine.

edit. okay use the functions below, they looks simpler...

(This post was last modified: 10-05-2011, 08:58 PM by Khyrpa.)
10-05-2011, 08:53 PM
Find


Messages In This Thread
Give yourself damage the damage - by neocrawler - 10-05-2011, 06:40 PM
RE: Give yourself damage the damage - by Khyrpa - 10-05-2011, 06:46 PM
RE: Give yourself damage the damage - by Elven - 10-05-2011, 07:29 PM
RE: Give yourself damage the damage - by Khyrpa - 10-05-2011, 08:53 PM
RE: Give yourself damage the damage - by DRedshot - 10-05-2011, 08:54 PM



Users browsing this thread: 1 Guest(s)