Frictional Games Forum (read-only)

Full Version: Gate question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey everyone,

I'm working on a very big story with INmotion Productions.
And I am here with a question about a portcullisgate which is used in the 07_archives_cellar.map. In my story I want to use that to that how more u turn the valve, how more the portcullisgate opens. And when not interacting with the valve that the portcullisgate slides down slowely.Huh

Does someone knows how to make this done. Or would somebody be so kind to explain it to me indeed?

Thank you anyways,Angel
Ferry,
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!
Code:
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.
Thanks man Tongue