(06-12-2012, 06:22 PM)Datguy5 Wrote: (06-12-2012, 06:20 PM)pdkgaming Wrote: (06-12-2012, 06:19 PM)Datguy5 Wrote: (06-12-2012, 06:18 PM)pdkgaming Wrote: (06-12-2012, 06:15 PM)Datguy5 Wrote: You seem to have Setenemy to hallucination in between the collidecallbacks.Try moving it?
It doesn't matter where you put the function right? as long as they trigger an event.. right? And even so.. where should I move it to?
You dont actually even need that.You can go to the level editor and click the enemy and then click the hallucination button in the other tab.
Oh, lol.. I didn't know that xD Thanks!
Np
oh... still doesn't work though xD
Do you know what I did wrong at the monster part?
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "playsound", true, 1);
AddUseItemCallback("StudyKey", "studykey_1", "mansion_2", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_2", "EnemyAppear", true, 1);
AddEntityCollideCallback("servant_grunt_1", "ScriptArea_3", "EnemyDisable", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "LookTimer", true, 1);
}
void playsound(string &in asParent, string &in asChild, int alState)
{
PlayMusic("break_wood1.ogg", false, 1, 0, 1.0, false);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_2", false, true);
PlaySoundAtEntity("unlock_door.snt", "unlock_door", "mansion_2", 0.0f, false);
RemoveItem("studykey_1");
}
void EnemyAppear(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 1, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "");
}
void EnemyDisable(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("servant_grunt_1", false);
}
EDIT: Nevermind :p for some reason, "servant_grunt_1" changed to "servant_grunt_2" in de level editor
But the first problem still exists :p