Frictional Games Forum (read-only)
script about monster and player - 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: script about monster and player (/thread-13743.html)



script about monster and player - trancedj - 03-04-2012

hello everyone!!
I need some help and my question today is:

I would like , When the monster sees the Player the level is over and the player must replay the map, with the message on screen like " don't let the monster see you to continue game."


How could I do that?

Thanks


RE: script about monster and player - trancedj - 03-06-2012

Hello!
any help please?


RE: script about monster and player - Your Computer - 03-06-2012

There isn't a function that allows you to detect if the monster has seen the player.


RE: script about monster and player - trancedj - 03-07-2012

Oh nooo!!



RE: script about monster and player - Shives - 03-07-2012

I think you could do this
But this just work if you script it when the Monster finds the player.
With an Area

void OnStart()
{
AddEntityCollideCallback("Player", "NameofArea", "Monster", true, 1);
}
void Monster(string &in asParent, string &in asChild, int alState)
{
ShowEnemyPlayerPosition("NameOfMonster");
AddTimer("", 1, "Restart");
}
void Restart(string &in asTimer)
{
TeleportPlayer("NameOfPlayerStartArea");
SetMessage("ShowMessage", "NameOfMessage", 5);
}


In the Language file the Category should look like this


<CATEGORY Name="ShowMessage">
<Entry Name="NameOfMessage">don't let the monster see you to continue game.</Entry>
</CATEGORY>



RE: script about monster and player - flamez3 - 03-07-2012

^ If I'm not wrong, that makes the Enemy see the Player automatically.


RE: script about monster and player - trancedj - 03-08-2012

Hi, I try what you wrote but it does not work? how could the area collide when the monster see player?