tell me whatcha thing
Hm, yeah, it looks like something is missing in this comparison so it’s failing to compile:
hmm, I’m trying to figure out how I can have tilemaps change, and I want there to be multiple levels too, so I thought maybe using variables would work?
Right, that sounds like a good idea - the issue here is that it’s comparing the current tilemap to 0, and the code is getting mad as it doesn’t think those two things can be compared. What exactly are you trying to do there? It looks like you might want it to say “if the current tilemap is the first one and you touch a green orb, teleport to the red orb” or something similar to that?
the compare to equal to zero was actually an accident on my part that I thought I fixed before posting! my original idea was “if current tilemap is equal to tilemap1 then”
Nice nice, I did a small update to make it work like that:
If that looks good to you I can update the original post with it so it doesn’t look broken at first~
tilemap level 1 block in the equality check there doesn’t work. To make it work I used an array to store the different levels, so you can point at the exact level you want and say ‘is the current tilemap this tilemap’:
@richard just to double check, in the current tilemaps extension there is no loose equality check for tilemaps right? I guess it probably wouldn’t work consistently anyways as you’ll often at least change one wall / tile at runtime
It doesn’t do deep equals, but it should always work with reference equality. You can use == in most cases.
I found a way to get the tilemaps to switch regularly
@Local_momo on level 3 the checkpoint at the end won’t take you to the next level- instead the lava under the checkpoint kills you
yeah, I haven’t gotten to that point yet, sorry!
No problem, I just thought it was a glitch