Frictional Games Forum (read-only)
OnDeath or another function? - 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: OnDeath or another function? (/thread-10038.html)



OnDeath or another function? - Mr. Bombastic - 08-29-2011

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


RE: I need your oppinion! - Your Computer - 08-29-2011

Number 3!: You die from a monster and you respawn and the monster resets and re-activates. Cool


RE: I need your oppinion! - Mr. Bombastic - 08-29-2011

(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




RE: I need your oppinion! - Khyrpa - 08-29-2011

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/04/why-trial-and-error-will-doom-games.html



RE: I need your oppinion! - Acies - 08-29-2011

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.


RE: I need your oppinion! - Mr. Bombastic - 08-29-2011

Oh, okay thanks guys..
Good ideas there, but i have problems with the OnDeath function..
I will include that in the first post Smile



RE: OnDeath or another function? - Juby - 08-29-2011

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



RE: OnDeath or another function? - MegaScience - 08-29-2011

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