Hi guys
Is there a way or code to manipulate a custom object (meaning not a tileset)
For example, if switch A turned off, there is no building but switch A turned off, there is a building (as an object, not picture). See the attached
The only way I can think is using 2 maps and switch but OOP JS is pretty powerful
Can anyone shed some light or idea on this issue ?
Thanks
You say it's not a tileset, then is it an event? Just make page conditions, otherwise turn the building into an event with page condition switch. If it's some object made with javascripting then you should have someway to access it and a parallel at map start with conditional branch if switch on obj.visible = true/false; would probably work.
short answer, yes.
long answer:
-code a new layer on the map.
-load a sprite object.
-tie that sprite to the layer.
-make it invisible.
if you don't want to use pictures as in *pictures* pictures, you can copy the image-loading capabilities of the Pictures object, and control it separately through a new layer: tie the layer to the map, and use an event to read it at event level.
since by default the events and the map are connected, you can tap into that from one end, and from the other, tap into your new layer.
Create a sprite of the house.
Create an event and set the image to the house sprite.
Set a condition for the event (some switch, variable, etc).
I wouldn't go around changing the entire tileset if I could help it. Also don't duplicate maps for this kind of changes, it will make your life harder with any changes you want to make later.