![]() |
InteractCallback - 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: InteractCallback (/thread-14540.html) |
InteractCallback - jessehmusic - 04-06-2012 hello my friends ! ![]() i got a problem , my script dosnt gives error but the function dosnt calls :S any clue --> hps void OnStart() { AddUseItemCallback("", "hollow_needle_1", "Locked_door", "NeedleOnDoor", true); AddUseItemCallback("", "Key", "locked_door_1", "KeyOnDoor", true); AddEntityCollideCallback("Player", "Horror_Barrel", "HorrorBarrel", true, 1); AddEntityCollideCallback("Player", "MusicStart_1", "Music1", true, 1); AddEntityCollideCallback("Player", "Event_1", "Horror_Event1", true, 0); SetEntityPlayerInteractCallback("PuzzleOne", "PuzzleOnInteract", true); SetEntityPlayerInteractCallback("Note_Scream2", "HeadLess", true); SetEntityPlayerInteractCallback("Note_Scream", "Sound1", true); } void HeadLess(string &in asParent, string &in asChild, int alState) { SetEntityActive("headless", true); PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false); } void Sound1(string &in asEntity) { PlaySoundAtEntity("", "15_prisoner_scream.snt", "Player", 0.0f, false); } void PuzzleOnInteract(string &in asEntity) { AddTimer("T1", 4, "Timer1"); } void Timer1(string &in asTimer) { SetMessage("Message", "PuzzleMessage", 0); } void NeedleOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("Locked_door", false, true); PlaySoundAtEntity("", "unlock_door", "Locked_door", 0, false); RemoveItem("hollow_needle_1"); } void KeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("locked_door_1", false, true); PlaySoundAtEntity("", "unlock_door", "locked_door_1", 0, false); RemoveItem("hollow_needle_1"); } void HorrorBarrel(string &in asParent, string &in asChild, int alState) { SetEntityActive("HorrorBarrel", true); PlaySoundAtEntity("HorrorBarrel", "24_iron_maiden.snt", "Player", 0, false); AddPropForce("HorrorBarrel", 20000, 0, 0, "world"); } void Music1(string &in asParent, string &in asChild, int alState) { PlayMusic("ambience_voice.ogg", true, 0.8f, 1, 0, true); } void Horror_Event1(string &in asParent, string &in asChild, int alState) { SetEntityActive("box", true); AddPropImpulse("box", 0, 0, 200, "world"); PlaySoundAtEntity("", "03_wind.snt", "Player", 0.0f, false); } void OnLeave() { } RE: InteractCallback - Statyk - 04-06-2012 Your syntax is wrong. void HeadLess(string &in asParent, string &in asChild, int alState) { SetEntityActive("headless", true); PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false); } it should be: void HeadLess(string &in asEntity) |