G'day folks.
I have a sliding gate that can be operated manually via "trigger_use" or automatically via either a scripted switch or button.
It all works perfectly fine except for the sound effects always play when using the scripted switch whether the gate is already opened or closed.
My question is how do I write an "If" / "else" statement so that the sound is only played if the gate is actually in the correct (open/closed) position to move?
I'm looking for the correct method of saying "gate1 is open" or "gate1 is closed"
Then the call "If gate1 is open".....
Else it should skip the playsound line and continue with the rest of the thread.
No need to close a gate that is already closed, right?
I've looked at other scripts with the if / else statements but none are jumping at me as an obvious solution for my gates.
Help in this would be much appreciated, thanks.