mfusaro
To add a sub-event, right click the Event just to the left of the icon for the first condition and from the pop-up menu select Add->Add sub-event.
If you right click on the text of the condition you get a different pop-up menu without this option.
You can also drag events under and to the right of other events to make them a sub-event.
It's also possible to do this as a single event with a single action, without needing the global variable:
Keyboard->On Space pressed
swimmer->Set animation to swimmer.AnimationName = "swim1" ? "swim2" : "swim1"[/code:3i9n1x5x]
but that is a slightly advanced use of [url=https://www.scirra.com/manual/78/expressions]expressions[/url]