How to make sprite go across levels?

so I’m making a crappy mario game and at the end of a level you go through a pipe to get to the underground but I want to know if you can make the right sprite emerge from the pipe. So if big mario went down the pipe big mario would emerge from the pipe. (here is a link to my game:

I suggest save the value of mario state into a global value.
So in the next level, you can check the global value and see what it is.
1 = small mario
2 = big mario
3 = fire mario

You need to make sure to “Set” the global value when Mario powers up and powers down.
Then you can check the global of the pipe like this:

PS: all globals with the same name activate at the same time when you “Set” them, which is why the switch is there to turn itself off.


@JR01 So I copied the code, but how do I set the global value?

because only small mario is coming out of the pipe right now

@JR01 Okay I made figured it out and now it works. Thank you so much!

1 Like