Hi all,
I've had success with adding sounds to my signals, but I've hit a snag when it comes to having sounds on a signal with multiple different arms - let's say a single post with one home arm and one shunt disc. They're both coded as ARM_HOME and both use AndiS scripts.
These have different animations and different sound sets which are synced together. They both work on their own, but when combining the two into one signal, it either plays one of the two sounds or both of them at the same time - depending on what tactic I try to sort them out! Now, normally this wouldn't be much of an issue but it's playing with my OCD...
This is my code below, as it stands. This only plays the home arm sound which is overwriting that of the shunt disc. The child objects on both are identically named.
function Initialise ()
DefaultInitialise() -- no need to give the route count here
gArmTable[1][ARM_HOME][SEM_CHILD_NAME] = "ARM_HOME1"
gArmTable[1][ARM_HOME][SEM_PROCEED_ANIM] = "Clear01"
gArmTable[1][ARM_HOME][SEM_BLOCKED_ANIM] = "Stop01"
gArmTable[2][ARM_HOME][SEM_CHILD_NAME] = "ARM_HOME2"
gArmTable[2][ARM_HOME][SEM_PROCEED_ANIM] = "Clear01"
gArmTable[2][ARM_HOME][SEM_BLOCKED_ANIM] = "Stop01"
end
function startOpening(dollIndex, armIndex)
Call ("ControlSound:SetParameter", "SignalProgress", 1)
end
function startClosing(dollIndex, armIndex)
Call ("ControlSound:SetParameter", "SignalProgress", 0)
end
Aside from re-animating the shunt discs so they match to the sounds, is there anything I can do (scripting wise) to play one sound when, say, ARM_HOME1 is up and play another sound when ARM_HOME2 is up?
Thanks!