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
My valves are flipping out!!!!
Nuclearbones Offline
Junior Member

Posts: 45
Threads: 19
Joined: May 2012
Reputation: 0
#1
My valves are flipping out!!!!

No joke. I wish I could record it and put it on YouTube for you guys, it's a truly grand moment.

But with all seriousness. I coded the script to get stuck and play a sound. But when I did my test run the first time I had forgotten to clarify my alState. Fixed that problem. Second test run, when I twist it to the right side it:
1. Makes the wrong sound (broken glass instead of metal clunk)
2. The valve begins to continuously spin at a fast speed, and there was no stopping it.

I don't know what I did, but I might keep that effect. But Just in-case I change my mind I would like the solution to both of these problems. Here is my .hps script so you can see.

////////////////////////////
// Run first time starting map
void OnStart()
{  
    //Valves
    SetEntityConnectionStateChangeCallback("valve_iron_1", "Unlock1");
    SetEntityConnectionStateChangeCallback("valve_iron_2", "Unlock2");
    SetEntityConnectionStateChangeCallback("valve_iron_3", "Unlock3");
    
}

void Unlock1(string &in asEntity, int level_state)
{
    if (level_state == 1)
    {
    PlaySoundAtEntity("", "07_pick_lock.snt", "Player", 0.0f, false);
    SetWheelStuckState(asEntity, 1, true);
    }
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Thanks for your support guys.

[EDIT]
I really need the help with changing the sounds people.
(This post was last modified: 10-01-2012, 06:53 PM by Nuclearbones.)
10-01-2012, 02:19 AM
Find


Messages In This Thread
My valves are flipping out!!!! - by Nuclearbones - 10-01-2012, 02:19 AM
RE: My valves are flipping out!!!! - by Robby - 10-01-2012, 07:03 PM



Users browsing this thread: 1 Guest(s)