Persistent Background (on room switch)

Cyb

New member
Hi nesmakers,

Im making some tests with the tool and following some tutorials just to get used to it.

I have two screens with tiles and objects on them.
On the first screen I'm able to change a specific tile type with ChangeAtTileCollision.

But...

When I swith to the second room and return to the first one (the one that i have changed the tiles at runtime), the changes are not there anymore.

Anyone else had this problem? Is it a limitation? Or is there something that I have to do to make the background persistent when switching rooms?

Thanks in advance.
 

dale_coop

Moderator
Staff member
Hey...
Each screen is loaded with the data you designed for it (in nesmaker). At runtime, you can use ChangeAtTileCollision to change temporarily some tiles one the current screen (already loaded). But when you re-enter the screen, it will be laded (again) with the data you designed for it (in nesmaker). As usual.
NES work like this.

What do you want to do exactly? Why/when do you want to change some tiles?
 

Cyb

New member
Hey dale,

Thanks for the reply.

In a more specific example, I want to be able to take down trees (among other things, like place bridges, etc...). I have a tile with a tree and another tile with a "taken down tree".

What Im able to do right now is when I'm standing on top o the tree tile, if I press A, it changes that tile to a "taken down tree tile" (just walkable for now).

What Im trying to achieve is that when I comeback to this same room, the tree is still taken down.
How can I change the tiles permanently?

Thanks in advance.
 
This might not be what you want because it will remove every "tree" tile on the screen, not just one, but maybe it's a start for you:

I don't have Nesmaker on my current computer to say which specific scripts, so please forgive my general wording for now, but in project settings>script settings, there are two scripts for handling triggered screens, and handling tiles on triggered screens. You need to have your tile type and tile graphic mentioned here, like the open door scripts you will see in the same files. Then make sure you have the "col" and "tile" indexes declared in your user constants.

That's very vague, but have a look and if it sounds like what you want, I can be more specific when I'm in the program later.
 

dale_coop

Moderator
Staff member
saturdayxiii is right, you could trigger the screen... but the problem is when you will re-enter the (triggered) screen, ALL your trees will be "taken down trees".
In NESmaker you will not be able to remember/store individual tile modifications. Sorry.
(you could implement that, but required a lot of code... and maybe a lot of memory space).
 
Top Bottom