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

Posts: 57
Threads: 19
Joined: Sep 2011
Reputation: 1
#1
Give yourself damage the damage

I found the script but is didnt work. Can someone give me te real one. and on what amount the player dies with full health?
10-05-2011, 06:40 PM
Website Find
Khyrpa Offline
Senior Member

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

100 health is max I think... But tell more info about this script? This makes no sense

10-05-2011, 06:46 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#3
RE: Give yourself damage the damage

Cause might not be in script, instead when you call it, then condition doesn't trigger or work Smile!

The Interrogation
Chapter 1

My tutorials
10-05-2011, 07:29 PM
Find
neocrawler Offline
Member

Posts: 57
Threads: 19
Joined: Sep 2011
Reputation: 1
#4
RE: Give yourself damage the damage

Now i wanted to set an area. and when i etered that area i will die. but the script i used didnt really work wel
(This post was last modified: 10-05-2011, 08:41 PM by neocrawler.)
10-05-2011, 08:41 PM
Website Find
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
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#6
RE: Give yourself damage the damage

are you sure you're using either

SetPlayerHealth(0.0f);?
AddPlayerHealth(-100.0f);?

Either of these scripts will instantly kill the player as long as their health is not raised above 100

Edit: Of course, if you want effects to be played when you are injured/killed, then the functions Khyrpa suggested would be more suitable Smile But the one's I've posted should be good enough for now.

(This post was last modified: 10-05-2011, 09:08 PM by DRedshot.)
10-05-2011, 08:54 PM
Find
neocrawler Offline
Member

Posts: 57
Threads: 19
Joined: Sep 2011
Reputation: 1
#7
RE: Give yourself damage the damage

oke thanks ^^
10-05-2011, 09:03 PM
Website Find




Users browsing this thread: 1 Guest(s)