Hey everybody!
For an educational game I need a button, which triggers an audio, that only works twice, e.g. says "listen", user clicks and hears audio once, button text changes to "listen again", user clicks and listens again, button disappears.
I tried this:
<<set _counter to 2>>
<span id="btn"><<button "listen!">>
<<audio test play>>
<<set _counter-->>
<<if _counter gt 0>>
<<replace "#btn">>
<<button "listen again">>
<<audio test play>>
<</button>>
<</replace>>
<<else>>
<<replace "#btn">>No more tries!<</replace>>
<</if>>
<</button>></span>
but it doesn't continue after the second click. Any ideas?
best, euba