Frictional Games Forum
[SCRIPT] It doesn't work... - Printable Version

+- Frictional Games Forum (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] It doesn't work... (/thread-29716.html)



It doesn't work... - Straxedix - 03-05-2015

Alright, i have 1 area when players enters area monster shall get activated from Inactive to Active.... i got script done and entered level and nothing pops up... seems like script is fine but still SHE doesn't appear ... i am talking about Girl Scary here is script:

Spoiler below!
PHP Code:
void OnStart()
{
AddEntityCollideCallback("Player""Teleport1""Appear"true1);
}

void Appear(string &in asParentstring &in asChildint alState)
{
    
SetNPCAwake("Girl1"truetrue);
    
SetNPCFollowPlayer("Girl1"true);



Area is called Teleport1... monster is called Girl1 i checked that...


RE: It doesn't work... - Darkfire - 03-05-2015

SetNPC X callbacks are for npc's (obviously), like Agrippa for example. However, monsters aren't npc's. They're entities, which means you have to use SetEntityActive callback.


RE: It doesn't work... - Straxedix - 03-05-2015

Awww okay i did got it wrong : ) Thanks for help +rep !