Create a red box frame and a blue box frame. Set the speed to 0 so it will only stay on Frame 0 and doesn’t automatically go to Frame 1, unless you change speed.
Go to Event sheet. Add an Event-Select Box sprite you just created. Add another Condition: Select Compare Frame = 0 (0 was the blue frame) Add an action: Select (Wait x (at the bottom) Set it for 2 seconds)
Add a 2nd action: Select Box - Select Change Frame to 1.
Add another event. Copy what you did in first event, but change the 2nd part of condition to Compare Frame = 1 and in the Add Action change wait time to 4 and Change Frame back to 0.
(Now instead of coding all this, you could go back to Animations Editor by clicking on your box. Duplicate Blue and Red frames multiple times. You can put in any order like 2 blues first then on Frame 3 make it Red. Set speed to 1 (if too slow, then change speed)
Add an Event: Select Your player (or weapon what ever you use to touch boxes) Select On collision with another object-Select Box. Add a Sub-Event: Select Box-Select Compare Frame = 0 (under animations section) Add action: Select Player - Select subtract from Health(if this case, you will need to create a health system).
Add another Sub-Event of the Condition (not the first sub-event you created).
Repeat previous SubEvent except change Compare Frame to 1. Add Action: Destroy Box or whatever you planned it to do.
NOTE: if you have more than one frame then in the 2 sub-events you will have to Make and Or block and add another condition and repeat Compare Frame and repeat it for each frame number Red is on. Go back up and do the same for Blue.
Hope that helps.