Constant prop force and extending hallways - 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: Constant prop force and extending hallways (/thread-19760.html) |
Constant prop force and extending hallways - Nuclearbones - 01-01-2013 I'm working on a claustrophobic hallway map. I plan on this to be the scariest part of the mod. To achieve this I will need swaying ceiling lanterns and an extending hallway. For the swaying lanterns I know that I need to use Prop Forces and stuff like that. But how do I make the lanterns constantly swinging? Also, I need help with the hallways looking like the exit is moving away from me and the hall looks like its getting smaller. I have a couple other effects I'm going to be doing but I don't want to spoil them! What other freaky delusions can you guys come up with? I want this thread to be FILLED with ideas! Thanks! And Happy New Year! RE: Constant prop force and extending hallways - Damascus - 01-01-2013 For the repeated prop force you are gonna want a timer that repeats itself: void SwingLantern(string &in asTimer) { AddPropForce("hanging_lantern_wall_10", 400, 0, 400, "world"); AddTimer("lantern2", 1.5f , "SwingLantern2"); } void SwingLantern2(string &in asTimer) { AddPropForce("hanging_lantern_wall_10", 200, 0, 200, "world"); AddTimer(asTimer, 1.5f , "SwingLantern2"); } I've found that to work pretty well for me, but it's kind of obvious to see when the force is applied on the downswing. I have it add a greater force to start it up and then smaller forces to keep it swinging. As for the hallway, I'd make each static object and the door into Move Object entities and use the SetMoveObjectStateExt script. If you set up a repeated line of script areas for the player to pass through, you can have it "open" slightly more for each script area. That way the door goes further away the further the player goes down the hallway. You can make it even more realistic by using GetPlayerSpeed through each script area, and making the door move away faster if the player is running. This will all take a lot of complicated scripting but I like your ideas RE: Constant prop force and extending hallways - FlawlessHappiness - 01-01-2013 Just remember to think: What if the player goes the other way? RE: Constant prop force and extending hallways - Kreekakon - 01-01-2013 (01-01-2013, 01:51 PM)beecake Wrote: Just remember to think: What if the player goes the other way? This can be countered by having a similar wall which advances towards the player from behind them at a same speed as the door/wall in front of the player. This can be made easier if instead of the walls/doors "constantly" moving, there are rather a number of separate instances when they do move (More the better of course since it can look a lot less jarring) |