Hi, I want to change the animation of a Sprite when a Boolean of his behavior change (because you can’t do it in an Action Function): If it’s True the object need to have the Animation 1 and if False the number 0.
Area_Ice is a sprite and BrickGroup is a Group of Sprite
But, this, don’t and I don’t understand why:
The boolean change but the event condition doesn’t see it.
It doesn’t work even if I change “BrickGroup” with a single Sprite of that Group.
“Set BrickGroup as Iced” is the Action that set the Boolean:
“IsIcedOrNot” is the boolean property already edited in the behavior editor.
I know that there are other ways to work around it but I want to understand how to work with GDevelop and what I can (or can’t) do with it; so, If someone understand what I’ve done wrong, just tell me, please.
Other way to do this is to add an Object variable to the brick sprites then check in a Foreach if that variable is 0/1
Foreach BrickGroup
— if brick.variable(obj_var_is_iced) = 0
Do something…
Maybe cahnge the sprite animation to frozen or something…
Foreach BrickGroup
---- if brick.variable(obj_var_is_iced) = 1
Do smething…
Maybe add a timer to defrost the bricks.,