The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 Troubles!
BonesTheRabbit Offline
Member

Posts: 68
Threads: 20
Joined: Feb 2012
Reputation: 2
#1
Wheel Troubles!

I've been trying to get this working, and I'm guessing I'm doing something silly, because it just doesn't want to work with me. The idea is that a function should trigger when the valve is turned all the way to its endpoint. The names are all just for the sake of clarity, and the functions in the trigger are just for testing.

void OnEnter()
{    
    SetEntityConnectionStateChangeCallback("EntityName", "FunctionName");
}

void FunctionName(string &in asEntity, int ValveState)
{    
    if (ValveState == 1)
    {
        SetPropObjectStuckState("EntityName", 1);
        PlaySoundAtEntity("", "explosion_rock_large.snt", "Player", 0.0f, false);
    }
}

I've triple checked the entity name, but the valve isn't locking, and the sound isn't playing. I've been looking through various tutorials, though most deal with levers, and I'm really stumped. I have a valve which opens a sliding door elsewhere on my map, and that works fine, but this one is proving problematic.

Any help would be greatly appreciated.
10-13-2013, 07:51 PM
Find


Messages In This Thread
Wheel Troubles! - by BonesTheRabbit - 10-13-2013, 07:51 PM
RE: Wheel Troubles! - by DnALANGE - 10-14-2013, 01:53 AM
RE: Wheel Troubles! - by Apjjm - 10-14-2013, 02:40 AM
RE: Wheel Troubles! - by BonesTheRabbit - 10-15-2013, 12:06 AM



Users browsing this thread: 1 Guest(s)