Code: Select all
screen Nbutton(coords,buttontimer):
button:
keysym ["K_RETURN", "K_v", "K_h", "K_m", "K_f", "mousedown_4", "mouseup_4", "mousedown_2", "mouseup_2"]
action NullAction()
imagebutton:
idle "n"
pos coords
action SetVariable("keypress",keypress+1),If(strkey > 3, SetVariable("strkey", 1), SetVariable("strkey", strkey + 1)), If(keypress >= 100, Jump("strtime.win"))
keysym "K_n", "mouseup_1"
timer buttontimer action Return(True)
Code: Select all
image n:
"n.png"
yanchor 0.5
xanchor 0.5
zoom 0.75
pause .15
zoom 1
pause .15
repeat
default strkey = 1
image testbg = ConditionSwitch (
"strkey == 1","testbg.png",
"strkey == 2","testbg2.png",
"True","testbg3.png"
)
Code: Select all
scene testbg
Effectively, every time you press the button, the background changes, and a variable is incremented until it hits 100, then you jump to another part of the script.
The problem: Every time the background is changed, the ATL pauses. If I don't have the background changing, then the ATL works fine, but as soon as I add that, the ATL will pause on every button press.
My goal here is to be able to swap the background on every button press, and preserve the button animation. So far I've tried about 50 different things and none have worked. I'll prolly try another 50, but who knows how much luck I'll have there!