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
Multiple Issues Help Lowering bridge(Still need help!)
assassinhawk45 Offline
Junior Member

Posts: 31
Threads: 11
Joined: Dec 2012
Reputation: 0
#1
Lowering bridge(Still need help!)

Once again I need help. I am trying to use a lever to lower a chained bridge. Is there a script for this?Huh

The Necromancer's Touch: WIP Coming March 2013
(This post was last modified: 01-19-2013, 10:39 PM by assassinhawk45.)
01-18-2013, 07:22 PM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
RE: Lowering bridge

http://wiki.frictionalgames.com/hpl2/amn..._functions
Look for the function SetMoveObjectStateExt(...)
It has parameters for speed, acceleration, etc.

01-18-2013, 07:29 PM
Find
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#3
RE: Lowering bridge

I just checked out how its used in the cistern level, and its something like this:

BreakJoint("NAMEOFBRIDGE_BallJoint_1");


I suppose it breaks the joint in the model represented by the chain.

I rate it 3 memes.
01-18-2013, 07:33 PM
Find
assassinhawk45 Offline
Junior Member

Posts: 31
Threads: 11
Joined: Dec 2012
Reputation: 0
#4
RE: Lowering bridge

Should the _ before Balljoint_1 be a comma?
I tried this and it didn't work, so I think that's what happened

The Necromancer's Touch: WIP Coming March 2013
01-18-2013, 07:45 PM
Find
assassinhawk45 Offline
Junior Member

Posts: 31
Threads: 11
Joined: Dec 2012
Reputation: 0
#5
RE: Lowering bridge

Here's my script
////////////////////////////
// Run when starting map
void OnStart()
{
SetEntityConnectionStateChangeCallback("lever", "func_shelf");
SetEntityCallbackFunc("oil_scare", "OnPickup");
SetEntityConnectionStateChangeCallback("lever_1", "BreakJoint");
}


void func_shelf(string &in asEntity, int alState)
{
if (alState == 1)
{
SetEntityActive("fail_1", true);
}
}


void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("grunt_head", true);
}


void BreakJoint (string& asName);
{
BreakJoint("bridge_BallJoint_1");
}

The Necromancer's Touch: WIP Coming March 2013
01-19-2013, 10:12 PM
Find




Users browsing this thread: 1 Guest(s)