Frictional Games Forum (read-only)
Give yourself damage the damage - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Give yourself damage the damage (/thread-10611.html)



Give yourself damage the damage - neocrawler - 10-05-2011

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?



RE: Give yourself damage the damage - Khyrpa - 10-05-2011

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



RE: Give yourself damage the damage - Elven - 10-05-2011

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



RE: Give yourself damage the damage - neocrawler - 10-05-2011

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



RE: Give yourself damage the damage - Khyrpa - 10-05-2011

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...


RE: Give yourself damage the damage - DRedshot - 10-05-2011

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.


RE: Give yourself damage the damage - neocrawler - 10-05-2011

oke thanks ^^