poly
New member
Hi all,
I hope somebody here can advise.
I'm trying to create buff that plays a sound when a variable achieved.
Here is my code:
<passive_effect name="CraftingOutputCount" operation="perc_set" value="@$machineoutput" tags="testslot"/>
<triggered_effect trigger="onSelfBuffUpdate" action="PlaySound" sound="open_apache_artifact_chest" play_in_head="true">
<requirement name="CVarCompare" cvar="@$machineoutput" operation="Equals" value="10" tags="slot100"/>
</triggered_effect>
The code works fine without the triggered effect. the '@$machineoutput' is sent out and works okay in game.
@$machineoutput is a random number from 10 to 100.
What I'm trying to do is if the number hits 10 (the lowest possible number), a sound is played.
I have tried everything but nothing works. I have tried putting it in it's own effect group, putting the triggered before the passive, creating a secondary buff etc.
The closest I have got is it plays the sound nonstop in game, regardless of the passive effect being active or not.
Can anyone seeing anything obviously wrong with the code?
Thanks
I hope somebody here can advise.
I'm trying to create buff that plays a sound when a variable achieved.
Here is my code:
<passive_effect name="CraftingOutputCount" operation="perc_set" value="@$machineoutput" tags="testslot"/>
<triggered_effect trigger="onSelfBuffUpdate" action="PlaySound" sound="open_apache_artifact_chest" play_in_head="true">
<requirement name="CVarCompare" cvar="@$machineoutput" operation="Equals" value="10" tags="slot100"/>
</triggered_effect>
The code works fine without the triggered effect. the '@$machineoutput' is sent out and works okay in game.
@$machineoutput is a random number from 10 to 100.
What I'm trying to do is if the number hits 10 (the lowest possible number), a sound is played.
I have tried everything but nothing works. I have tried putting it in it's own effect group, putting the triggered before the passive, creating a secondary buff etc.
The closest I have got is it plays the sound nonstop in game, regardless of the passive effect being active or not.
Can anyone seeing anything obviously wrong with the code?
Thanks