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
#1
Lowering a metal_bridge_vert with a lever?

I've tried to use the script from the campaign but it's way to difficult for me to understand. I've tried some other things like replace the upper bridge with a lower bridge but visually it looks like crap. I wonder how to lower the bridge after you've pulled all the 3 levers with a simple as possible script. Does anyone have any experience with this?
(This post was last modified: 01-30-2011, 06:45 PM by Beatlebattle.)
01-30-2011, 06:43 PM
Find
Beatlebattle Offline
Junior Member

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

It seems this might be too difficult. I guess I could try to use only 1 lever for the bridge to lower but I still don't know how. I would really like to have the script because when I got this my story is finished Smile
01-31-2011, 02:49 PM
Find
Vradcly Offline
Member

Posts: 100
Threads: 6
Joined: Jan 2011
Reputation: 0
#3
RE: Lowering a metal_bridge_vert with a lever?

Ill let you know if i do anything similar, but right now I cant help you...
02-01-2011, 12:06 AM
Find
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




Users browsing this thread: 1 Guest(s)