Frictional Games Forum (read-only)

Full Version: script about monster and player
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Hello!
any help please?
There isn't a function that allows you to detect if the monster has seen the player.
Oh nooo!!
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>
^ If I'm not wrong, that makes the Enemy see the Player automatically.
Hi, I try what you wrote but it does not work? how could the area collide when the monster see player?