Select the "is global variable" condition under the "every 100"
press CTRL + c
select the last "always" condition
press CTRL +v
change the "alive" in the condition to "dead"
Cant be easier.
Another side effect of using this method is ....
you force yourself to make a mental snapshot of the context that we used this global variable in ..
by scrolling back to it, to copy it.
The story of game, the flow, stays fresh in your mind.
delete the always in that event.
Now go to the layout editor. Add a new layer on top.
Select the layer on top.
add a sprite "02.png" from the oopz folder
place it in the middle of the layout.
toggle its properties "Invisible on start" (under appereance)
Name it Oopz
Bring up the Animation organizer on the right.
Change "default" in "idle"
Right click an empty spot in the upper part of the organizer.
choose "add new animation" from context menu
Name the animation "over"
The animation, not the angle thingy
a name is a properties, and those u change on the left .. member ?
select the angle under "over"
In the frame portion of the organize you see the number 1
But there is no sprite/frame yet.
Right click the "1" ...
choose "import frames"
only import the 01.png from the oopz folder.
Back to the events editor.
Add a sub event to the last event (is global variable = dead)
step1: object = mouse and keyboard
step2: condition = mouse is over object
step2: object = Oopz
add a new action to this.
step1: self = Oopz
step2: action = Set animation
step3: name = "over" (including the "'s)
Duplicate that EVENT.
Right click the CONDITION in that event .. and invert condition
change the "over" in the duplicated action to "idle"
Copy the first sub event (the not inverted one)
double click the condition of the copy to edit it
one step back
step2: condition = On object clicked
step3: parameters: button = left / type = clicked / object = Oopz
delete the action is there because of the copy.
Add a new action to it.
step1: object = Oopz
step2: action = set visible
step3: parameters = Invisible.
CTRL+c, CTRL+v (copy) this event.
In the first one ...
double click the condition.
click 2 times back
step1: object = system object
step2: condition = Trigger once while true
double click the action to change invisible to visible.
Add another action to the previous event, the "on left clicked event"
step1: system object
step2: action = Go to layout
step3: parameters: layout = "layout 1" (including "'s) / transition = none / duration = 200
Why duration ?
Often if the layout has a big "on layout start event", it will crash if you keep the duration on zero.
A none zero duration, till even 1000 or 2000 when the "on layout start" event includes loops,
will prevent this crash.