In a turned base, you have to isolate phases.
You could isolate these phases into different groups to switch on and off.
Or use a variable "phase" like that:
Global number phase = 0
+System: phase = 0
[insert the first phase code]
+on phase validated
-> System: set phase to 1
+System: phase = 1
[insert the second phase code]
+on phase validated
-> System: set phase to 2
+System: phase = 2
[insert the third phase code]
+on phase validated
-> System: set phase to 0