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
Script Help Wheel lever wont stick in positon once turned
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Wheel lever wont stick in positon once turned

The script is incorrectly formatted so I assume you're crashing the game?

Remember you cannot call a void block function from within another function (like inside your OnStart). Try this:

PHP Code: (Select All)
void OnStart()
{
    
SetEntityConnectionStateChangeCallback("Gate_Valve_1""ValveEventHandler");
}

void ValveEventHandler(string &in asEntityint alState)
{
    if(
alState == 1)
    {
        
SetPropStaticPhysics("Gate_Valve_1"true);
        
SetMoveObjectStateExt("sewer_bulkhead_1"0.88510.12true);
    }


With this you can also try //commenting out the SetPropStaticPhysics and see if SetWheelStuckState works better for you if you want.

(This post was last modified: 06-24-2016, 05:11 PM by Mudbill.)
06-24-2016, 05:08 PM
Find


Messages In This Thread
RE: Wheel lever wont stick in positon once turned - by Mudbill - 06-24-2016, 05:08 PM



Users browsing this thread: 1 Guest(s)