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
Lowering a metal_bridge_vert with a lever?
Beatlebattle Offline
Junior Member

Posts: 27
Threads: 5
Joined: Jan 2011
Reputation: 0
#4
RE: Lowering a metal_bridge_vert with a lever?

(02-01-2011, 12:06 AM)Vradcly Wrote: Ill let you know if i do anything similar, but right now I cant help you...

I just figured it out how to do it. I copied it somewhere else. Here's the script:

void InteractBridgeLever1(string &in asEntity, int alState)
{
if(alState == 0) return;
string sBridge = asEntity=="" ? "" : "bridge_metal_vert_1";

if(alState == -1)
{
if(GetLocalVarInt(asEntity) == -1) return; //Fix behaviour error if pulling lever double direction.
SetMoveObjectState(sBridge, 2.66);
PlaySoundAtEntity("soundclank_"+sBridge, "14_elevator_clank", "Player", 0.5f, false);
StartScreenShake(0.05f, 0.5f, 0.2f, 0.6f);
}

SetLeverStuckState(asEntity, alState, true);
AddDebugMessage(asEntity + " State: "+alState, true);
}
void OnStart()
{

You have to fill InteractBridgeLever1 in the levers ConnectStateChangeCallback
(This post was last modified: 02-01-2011, 12:13 AM by Beatlebattle.)
02-01-2011, 12:11 AM
Find


Messages In This Thread
RE: Lowering a metal_bridge_vert with a lever? - by Beatlebattle - 02-01-2011, 12:11 AM



Users browsing this thread: 1 Guest(s)