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
ferryadams10 Offline
Senior Member

Posts: 288
Threads: 40
Joined: Apr 2011
Reputation: 19
#1
Question  Gate question

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,

Got a nice sofa
Please come and have a seat for a while

(This post was last modified: 05-24-2011, 04:25 PM by ferryadams10.)
05-23-2011, 06:44 PM
Find
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
ferryadams10 Offline
Senior Member

Posts: 288
Threads: 40
Joined: Apr 2011
Reputation: 19
#3
RE: Gate question

Thanks man Tongue

Got a nice sofa
Please come and have a seat for a while

06-04-2011, 12:55 PM
Find




Users browsing this thread: 1 Guest(s)