Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Constant prop force and extending hallways
Nuclearbones Offline
Junior Member

Posts: 45
Threads: 19
Joined: May 2012
Reputation: 0
#1
Constant prop force and extending hallways

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!
01-01-2013, 08:01 AM
Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#2
RE: Constant prop force and extending hallways

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

01-01-2013, 01:36 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#3
RE: Constant prop force and extending hallways

Just remember to think: What if the player goes the other way?

Trying is the first step to success.
01-01-2013, 01:51 PM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#4
RE: Constant prop force and extending hallways

(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)

[Image: Tv0YgQb.gif]
Image by BandyGrass
(This post was last modified: 01-01-2013, 01:56 PM by Kreekakon.)
01-01-2013, 01:56 PM
Find




Users browsing this thread: 1 Guest(s)