Hey guys. I am working on a custom story and there is this part where you are in a hallway and a grunt is patrolling it. You have to sneak across him in order to get to the other room. But the thing i want to do is that if the player fails to sneak across the hallway and dies, I want the player respawn and try sneak pass him again. (like a videogames these days. if you die, you start from a checkpoint and you have to do the part again.) I just cant seem to do it. When I die, i do start at the assigned checkpoint, but the script areas no longer work and the grunt doesn't spawn anymore. Is there a way to do it? Please help. Thanks!
wrong callback syntax at TryAgainOne.
right one is:
void TryAgainOne(string &in asName, int alCount)
Also, you forgot the entity file at CreateEntityAtArea:
CreateEntityAtArea("hallway_grunt", "servant_grunt.ent", "monster_area1", false);
And your second question, what do you mean by script area? I don't understand your question.
if you want the area to work several times, just change the true to false.
instead of creating an enemy at a entity, i suggest to set out one in the editor and make him inactive, and when colliding with the area, the monster will be activated, and if you die, the monsters will always dissappear but when you collides with the area it will respawn.
SetEntityActive("Monster", true);
simply nuff said
(This post was last modified: 06-29-2012, 07:50 PM by EXAWOLT.)
(06-29-2012, 07:47 PM)FastHunteR Wrote: wrong callback syntax at TryAgainOne.
right one is:
void TryAgainOne(string &in asName, int alCount)
Also, you forgot the entity file at CreateEntityAtArea:
CreateEntityAtArea("hallway_grunt", "servant_grunt.ent", "monster_area1", false);
And your second question, what do you mean by script area? I don't understand your question.
alright, i got the monster to spawn again, but how do i get him to spawn where he first came from instead of the spot where he killed me? And for the other question, i want the script areas to activate again after the player dies. Ex: the player walks down a hallway and goes through a script area, which cause the screen to fade and forcing the player to put away his lantern., i want it so that if the player dies, all this would happen again when he went through a second time. It sounds weird when i put it in words, so i found a video that would help describe it.
Notice as he goes though the part at 6:43 but dies later on, but at 7:34 when he respawns all the things happen again, like the screen turning black.
(06-29-2012, 07:48 PM)EXAWOLT Wrote: if you want the area to work several times, just change the true to false.
instead of creating an enemy at a entity, i suggest to set out one in the editor and make him inactive, and when colliding with the area, the monster will be activated, and if you die, the monsters will always dissappear but when you collides with the area it will respawn.
SetEntityActive("Monster", true);
I tried it but he wont even spawn when i collide with the area anymore
(06-29-2012, 07:48 PM)EXAWOLT Wrote: if you want the area to work several times, just change the true to false.
instead of creating an enemy at a entity, i suggest to set out one in the editor and make him inactive, and when colliding with the area, the monster will be activated, and if you die, the monsters will always dissappear but when you collides with the area it will respawn.
SetEntityActive("Monster", true);
Heres a pic
i want it so that if the player fails, everything resets, such as the enemy pos and the fadeout script area
(This post was last modified: 06-29-2012, 08:21 PM by HoyChampoy.)
If the grunt kills the player, it won't activate again. The monsters were designed to not prevent the player from progressing, and dynamically created monsters don't follow path nodes. You'll need to have monsters in store to "reactivate" them.