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


Messages In This Thread
RE: Constant prop force and extending hallways - by Damascus - 01-01-2013, 01:36 PM



Users browsing this thread: 1 Guest(s)