Frictional Games Forum (read-only)
[SCRIPT] Monster Area doesn't work - 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] Monster Area doesn't work (/thread-19362.html)



Monster Area doesn't work - Bl4ckSheep - 11-26-2012

The monster is supposed to spawn when the player walks into the area, but when I walk through it, nothing happens...
I'm not really sure where the problem comes from, is there an error in the script ?

Thank you.


void OnEnter()
{
AddEntityCollideCallback("Player", "CorridorArea", "monster3", true, 1);
}


void monster3(string &in asEntity, string &in type)
{
SetEntityActive("CorridorMonster1", true);
ShowEnemyPlayerPosition("CorridorMonster1");
}


RE: Monster Area doesn't work - FlawlessHappiness - 11-26-2012

(string &in asEntity, string &in type)
This is the syntax not for when you use a collide function.


The correct syntax is (string &in asParent, string &in asChild, int alState)


Try looking at this: http://www.frictionalgames.com/forum/thread-18368.html


RE: Monster Area doesn't work - Bl4ckSheep - 11-26-2012

(11-26-2012, 05:51 PM)beecake Wrote: (string &in asEntity, string &in type)
This is the syntax not for when you use a collide function.


The correct syntax is (string &in asParent, string &in asChild, int alState)


Try looking at this: http://www.frictionalgames.com/forum/thread-18368.html
Thank you very much, it worked !
I started to script yesterday so I'm not so good at this Confused


RE: Monster Area doesn't work - FlawlessHappiness - 11-26-2012

That's why you're here! Wink
You learn here! I did that too