04-22-2012, 04:48 PM
Im still new to scripting but basically i want to enter a area and a monster wakes up breaks a door charges at you then poofs. Here is my script. And he doesn't spawn at all.
void OnStart()
{
PlayMusic("ambience_swoop_myst.ogg", true, 0.8f, 1, 0, true);
AddEntityCollideCallback("Player", "Pop1Area", "Pop1Func", true, 1);
SetEntityCallbackFunc("Pop1Door", "Pop1DoorBreakFunc");
}
void Pop1DoorBreakFunc(string &in asEntity, string &in type)
{
SetEnemyIsHallucination("Pop1Brute", true);
}
void Pop1Func(string &in asParent, string &in asChild, int alState)
{
SetNPCAwake("Pop1Brute", true, true);
ShowEnemyPlayerPosition("Pop1Brute");
}
I used the exact codes from the engine scripts wiki page. I don't know what i'm doing wrong..
void OnStart()
{
PlayMusic("ambience_swoop_myst.ogg", true, 0.8f, 1, 0, true);
AddEntityCollideCallback("Player", "Pop1Area", "Pop1Func", true, 1);
SetEntityCallbackFunc("Pop1Door", "Pop1DoorBreakFunc");
}
void Pop1DoorBreakFunc(string &in asEntity, string &in type)
{
SetEnemyIsHallucination("Pop1Brute", true);
}
void Pop1Func(string &in asParent, string &in asChild, int alState)
{
SetNPCAwake("Pop1Brute", true, true);
ShowEnemyPlayerPosition("Pop1Brute");
}
I used the exact codes from the engine scripts wiki page. I don't know what i'm doing wrong..