Frictional Games Forum (read-only)

Full Version: Constant prop force and extending hallways
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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!
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 Wink
Just remember to think: What if the player goes the other way?
(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)