Is there a way to detect tiles in rooms the player is not in without moving the player to those rooms.
something like:
tile_in_other_room = name tileX,tileY in "room2"
I don't think so. But since all variable are globally scoped, you could track a tile name by storing it in a variable; naming it something like <roomname>_<x>_<y>
, like basement_1_3
. And when the player enter the room, generate the room (or some aspects of it ) upon entering the room from that (or of more variables).
If this doesn't help you, could you tell more about what you are trying to solve or achieve?
Oh no, that would be very cool, but I have not been able to come up with a way to do it.
Tiles are one of the only things you can address with a number variable so it would be very nice to store information in some room by saving tiles. You could probably do something like
return_x = event.px
return_y = event.py
return_room = event.room`
call_on_enter = "readAndReturn"
goto 0, 0 in "roomB"
and then in roomB have something like this:
on enter do
call call_on_enter
end
on readAndReturn do
call_on_enter = ""
// do whatever you wanted to do the tile(s) you wanted to read
zero_zeros_name = name 0,0 // for an example
goto return_x, return_y in return room
I have considered this just so I could have something that works something like a list, but I ended up going with something else that didn't involve all the jumping around (I didn't want to have to be so careful with my on enter do
blocks)
It's a good idea! Unfortunately it takes two frames to exit one room and enter another so you couldn't do this jumping between rooms without it being noticeable. At best you could maybe draw a loading screen with the room switching in the background.