The issue here is that the transform animation keeps playing infinitely, it doesn't even wait for the transform to end before a new one starts again. I want the screen to happen only one time until it is called again.
And to call the label orbs, it needs to meet a condition, but even when the condition isn't met, the animation still keeps playing over and over.
Code: Select all
label orbs :
show screen orbs
call screen attack
screen orbs:
fixed:
for i in range(1, 10):
$ start_x, start_y, end_x, end_y, ctrl_1_x, ctrl_1_y, ctrl_2_x, ctrl_2_y, duration = display_and_move_orbs(monster.level)
$ orb_id = "blue_orb_" + str(i)
imagebutton:
focus_mask True
idle (orb_id)
hover (orb_id)
at bezier_arc((start_x, start_y), (end_x, end_y), (ctrl_1_x, ctrl_1_y), (ctrl_2_x, ctrl_2_y), duration)
action NullAction()
transform bezier_arc(start, end, ctrl_1, ctrl_2, duration):
on idle :
zoom 0.15
alpha 0
subpixel True
pos start
linear duration pos end knot ctrl_1 knot ctrl_2 alpha 1
block:
ease 1 yoffset +5
ease 1 yoffset -5
repeat
on hover :
zoom 0.2
alpha 1.0 matrixcolor TintMatrix("#f91307ff")
linear 0.2 xpos 100 ypos 100 alpha 0