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
Gate question
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#2
RE: Gate question

I had this same problem and got it working eventually,
I copied the code from 17_controlroom.hps and changed the names of the valves etc so it would work. I also had to add some more code because for some reason the gate wouldn't slowly slide back down when i wasn't using it.
Spoiler below!
void OnStart()
{
InteractConnectPropWithMoveObject("v_s_1", "valve1", "gatename", true, false, 1);    
InteractConnectPropWithMoveObject("v_s_2", "valve2", "gatename", true, false, 1);    
}
void InteractWheel(string &in asEntity)
{
    SetEntityPlayerInteractCallback("gatename", "", true);    
    AddTimer("godown", 0.1f, "Timer");
}
void Timer(string &in asTimer)
{
    SetMoveObjectStateExt("gatename", 0.0f, 0.2f, 0.3f, 0.1f, true);
    AddTimer("loop", 0.1f, "TimerLoop");
}
void TimerLoop(string &in asTimer)
{
    SetMoveObjectStateExt("gatename", 0.0f, 10.0f, 0.3f, 0.1f, false);
    AddTimer("loop", 0.1f, "TimerLoop");
}

you also have to go onto leveleditor, click on the valve > entitytab and check fullgamesave, add a playerinteractcallback called InteractWheel, tick playerinteractautoremove, set stuckstate minimum, and interactiondisablestuck. the door should now work properly, and slide down when not interacted with.

(This post was last modified: 06-01-2011, 09:51 PM by DRedshot.)
06-01-2011, 09:49 PM
Find


Messages In This Thread
Gate question - by ferryadams10 - 05-23-2011, 06:44 PM
RE: Gate question - by DRedshot - 06-01-2011, 09:49 PM
RE: Gate question - by ferryadams10 - 06-04-2011, 12:55 PM



Users browsing this thread: 1 Guest(s)