Frictional Games Forum (read-only)

Full Version: OnDeath or another function?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Thanks for your previous comments, i now know what i am going to do, but..

What is the best script to use when you die from a monster and then when you return another monster appears, but on another spot with different path nodes and such.

Do i use the OnDeath function?
And how do i use the function?

Please help me Smile
Number 3!: You die from a monster and you respawn and the monster resets and re-activates. Cool
(08-29-2011, 10:14 AM)Your Computer Wrote: [ -> ]Number 3!: You die from a monster and you respawn and the monster resets and re-activates. Cool
Oh yeah, that's aa good idea Smile

How about?

Number 4: monsters are easier to survive and if you die, you will respawn and the monster event is changed slightly

Good points from frictionals blog (everyone should read through the blog, its awesome):
Spoiler below!
Regarding death and fear-factor, consider the following:

1) If the player fears death because of a trial and error system, she fears an abstract mechanic and not something of the game world. By worrying about a game mechanics, the player is pulled out of the experience.

2) Once death has occurred, the player will know what to expect. If killed by a creature that jumped out from behind a corner, the next time the encounter will have far from the same effect.

full blog page post: http://frictionalgames.blogspot.com/2010...games.html
Let's step it up:

Number 5: You die, but spawn in a new area connected to the map (perhaps by a locked door). In that way it becomes harder to predict patrol nodes + you get to explore something new (new = unknown = scary), not just run past an area you already know.
Oh, okay thanks guys..
Good ideas there, but i have problems with the OnDeath function..
I will include that in the first post Smile
The "OnDeath" function as you call it, is already in the game.

CheckPoint("Death", "PlayerStartArea_RS", "CPCall01", "DeathHintCategory", "DeathHintEntry");

Use this command whenever.

Code:
void CPCall01(string &in asName, int alCount)
   {
      Stuff to do !
   }
This is the function that gets called. asName is the name of the the first parameter in CheckPoint(); int alCount is the number of times a player has died, so you could write something like this...

Code:
void CPCall01(string &in asName, int alCount)
{
      if(asName == "Death") {
          if(alCount == 1) { Stuff }
   }
}
Or.. You could make some complex code based on the number of deaths to randomize the path nodes used? Big Grin Would have to make sure it's still a path and not just random unconnected nodes, but still. Tongue