[SCRIPT] How to make a door open ajar? - 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: [SCRIPT] How to make a door open ajar? (/thread-20302.html) Pages:
1
2
|
RE: How to make a door open ajar? - serbusfish - 02-13-2013 You guys have been busy since ive been away Thanks, i'll see if I can get it to work. RE: How to make a door open ajar? - serbusfish - 02-14-2013 I have it sorted, thanks again One more thing though, rather than make a new thread can someone tell me how I can activate a script box within the game? I tried the SetEntityActive command but it seems to activate when the map is loaded. EDIT: I tried this script but it wont work, what am I doing wrong? Code: AddEntityCollideCallback("Player", "ScriptArea_slam", "DoorSlam", true, 1); RE: How to make a door open ajar? - NaxEla - 02-14-2013 (02-14-2013, 01:01 AM)serbusfish Wrote: I have it sorted, thanks again SetEntityActive will work to set a script area active/inactive. If you put SetEntityActive in OnStart or OnEnter, the script area will activate when the map is loaded. If you want it to happen after a certain event, then it would go in a different function. In this example, the script area (ScriptArea_1) gets activated when the player steps into a different script area (ScriptArea_2) : PHP Code: void OnStart() Make sure that ScriptArea_1 is set inactive in the level editor. RE: How to make a door open ajar? - FlawlessHappiness - 02-14-2013 (02-14-2013, 01:01 AM)serbusfish Wrote: I tried this script but it wont work, what am I doing wrong? You put the code i gave you in a collide function, but it's supposed to be a timer. That's why it doesn't work Code: void OnStart() Since you want the door to slam, it should need this: SetSwingDoorClosed("castle_arched01_11", true, false); because if it's going to slam it should already be open. |