Frictional Games Forum (read-only)

Full Version: activating monster on script area
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
so how do i activate a monster when i step on the script area i can do it when i pick up key but i tested the script area and it didnt work this is my script.
void OnStart()
{
SetEntityPlayerInteractCallback("ScriptArea_1", "ActivateMonster", true);
}
void ActivateMonster(string &in item)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle");
}
void OnEnter()
{
{
void OnLeave()
}
so what do i have to change to get him to activate i also changed it to a hullicination so would i have to change parts of the script for that aswell? thanks Smile
Change
SetEntityPlayerInteractCallback("ScriptArea_1", "ActivateMonster", true);


To AddEntityCollideCallback("Player", "ScriptArea_1", "ActivateMonster", true, 1);


and void ActivateMonster(string &in item)


to


void ActivateMonster(string &in asParent, string &in asChild, int alState)
works great thanks Smile