Amnesia script help! - 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: Amnesia script help! (/thread-24898.html) |
RE: Amnesia script help! - theodorg - 03-22-2014 (03-22-2014, 12:39 AM)valetheimpaler Wrote: is the wall static? I understand that you cant regularily activate/deactivate static objects Okay i found the error it was just a simple matter of misspelling now the wall works fine. I could use some help with a script to remove the wall thou. That would be helpful! And thanks for your help! RE: Amnesia script help! - Mudbill - 03-22-2014 Remove the wall? What about SetEntityActive with false? RE: Amnesia script help! - theodorg - 03-22-2014 (03-22-2014, 02:45 AM)Mudbill Wrote: Remove the wall? What about SetEntityActive with false? Oh yes of course! Sry im new to this and thanks so much! (03-22-2014, 02:45 AM)Mudbill Wrote: Remove the wall? What about SetEntityActive with false? I did as you said but it dosen't work. The wall spawn but never goes away. This is the script: //////////////////////////// // Run first time starting map void OnStart() { AddUseItemCallback("", "Awesome_key", "Awesome_door", "ABC", true); AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1); AddUseItemCallback("", "secret_key", "secret_door", "SECRET", true); AddEntityCollideCallback("Player", "servant_grunt_1", "MonsterAway", true, 1); } void ABC(string &in asItem, string &in asEntity) { SetSwingDoorLocked( "Awesome_door", false, true); PlaySoundAtEntity("", "unlock_door", "Awesome_door", 0, false); RemoveItem("Awesome_key"); } void SECRET(string &in asItem, string &in asEntity) { SetSwingDoorLocked( "secret_door", false, true); PlaySoundAtEntity("", "unlock_door", "secret_door", 0, false); RemoveItem("secret_key"); } void MonsterFunction(string &in asParent, string &in asChild, int alState) { SetEntityActive("servant_grunt_1", true); SetEntityActive("popup_wall_1", true); } void MonsterAway(string &in asParent, string &in asChild, int alState) { SetEntityActive("popup_wall_1", false); } RE: Amnesia script help! - Mudbill - 03-22-2014 I don't think you can use the collision event with the player and the monster, because since it is a poofer, it disappears just before it collides with you. The event is never called. RE: Amnesia script help! - theodorg - 03-23-2014 (03-22-2014, 07:02 PM)Mudbill Wrote: I don't think you can use the collision event with the player and the monster, because since it is a poofer, it disappears just before it collides with you. The event is never called. Ok i fixed it now but i have one more question that i didnt find an answer on your youtube channel. AddEntityCollideCallback("Player", "PlayerCollide", "MonsterFunction", true, 1); <---- what does the (1) mean at the end of this sentence? RE: Amnesia script help! - Romulator - 03-23-2014 Inb4 Mudbill :3 The 1 indicates a state of collision, it can be 1, 0 or -1. 1 - Upon colliding with the object 0 - Both -1 - Upon leaving the object you collided with RE: Amnesia script help! - Mudbill - 03-23-2014 That number can be either 1, 0 or -1. 1 = Event is executed as you enter the area, -1 = Executed as you leave the area, 0 = both. 0 does the same as 1 if the boolean before is set to true. If false, the event happens twice as you walk through the area. Edit: Ninja'd. Hue. |