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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Script help! (/thread-8393.html) |
Script help! - SLAMnesia - 06-02-2011 Hello fellow amnesia editors! Im workin on this scene and ill put it clearly here: you walk down a prison hallway, before you walk up to a cell you are forced to look at the door and have a sound say something like "Please help me" then when you open the door theres a scream, the lights in the cell go out and you're thrown out the cell and the door closes and locks as you exit. sounds a little complicated to me but idk if it truly is. Help is more than appreciated! RE: Script help! - DannieWest - 06-02-2011 Just create one ScriptArea and place it in front of the door, whenever you want him to look at the door Then use: Code: void OnStart() All stuff behind // can be removed if you think it gets to messy, just put em there if you wanna copy the script, so nothing gets messed up RE: Script help! - SLAMnesia - 06-03-2011 Hey man, thanks so much for the help I had no idea what to do >.> but theres one problem in the script Quote:AddPlayerBodyForce("3000", "0", "3000", true);seems to be causing an issue. I dont know if theres some unit you're supposed to include like meters or something. thanks again RE: Script help! - SLAMnesia - 06-03-2011 AND I FORGOT ONE MORE! When I click on the door which initates all the actions all the correct events (except the knockback which is being fixed) happen. But I would like the action to not work after one time. in other words have the whole scare happen once so when you try to open the door a second time you dont lose more sanity and the door doesn't slam again. RE: Script help! - DannieWest - 06-04-2011 Did you manage to fix the bodyplayerforce thingy? :o Oh, my bad! Code: SetEntityPlayerInteractCallback("doorname", "CellActivity", false); |