It is currently April 19th, 2024, 9:04 am
Get help with creating, editing & fixing problems with skins
CodeCode
Posts: 1365 Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia
Post
by CodeCode » May 8th, 2022, 11:53 am
Hello,
I have a sound playing when a conditional value is reached, like this:
Code: Select all
[Variables]
On=Play #@#on.wav
Off=Play #@#off.wav
No=PlayStop
Sound=1
[MeasureSliderBop]
Measure=Plugin
Plugin=ActionTimer
IfCondition=((#OffSetB# < 0) && (#Sound# > 0))
IfTrueAction=[#Off#]
IfFalseAction=[#Off#][Wait 100][#No#]
IfCondition2=((#OffSetB# > -140) && (#Sound# > 0))
IfTrueAction2=[#On#]
IfFalseAction2=[#On#][Wait 100][#No#]
DynamicVariables=1
[MeterLowTextHidden]
Meter=STRING
LeftMouseUpAction=[!SetVariable Sound "(1-#Sound#)"][!WriteKeyValue Variables Sound "[#Sound]"][!Update]
DynamicVariables=1
Is it because actiontimer doesn't like conditionals? That can't be right since I am throwing them around like wildfire. Can't seem to find the winning combination here. Not sure what I have tried but at this stage, still no joy.
Thanks for any help or recommendations.
Last edited by CodeCode on May 8th, 2022, 12:06 pm, edited 1 time in total.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
CodeCode
Posts: 1365 Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia
Post
by CodeCode » May 8th, 2022, 12:06 pm
Ok. SOrry.
No problem here. I was testing only one part of the skin and there are three where those sounds play. Testing the wrong one.
The one with that code works fine.
So SOLVED>
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
CodeCode
Posts: 1365 Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia
Post
by CodeCode » May 8th, 2022, 12:35 pm
ok, just to be clear this is what works. The IfFalseAction is not needed:
Code: Select all
IfCondition=((#OffSetB# < 0) && (#Sound# > 0))
IfTrueAction=[#Off#]
IfCondition2=((#OffSetB# > -140) && (#Sound# > 0))
IfTrueAction2=[#On#]
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.