How can I draw a backdrop behind map tiles
Moderators: marionline, SDHawk
- Gigglyardo
- Slime
- Posts: 9
- Joined: Sun Aug 16, 2015 1:20 am
How can I draw a backdrop behind map tiles
I want to draw a still backdrop behind the map tiles. I realize the map tiles will have to be transparent in order to see the backdrop behind them. Is this possible?
- Bob the Hamster
- Lord of the Slimes
- Posts: 7660
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
Hmm, yes, I think this should be possible with a little scripting.
First, map layer 0 is always opaque. Fortunately you can hide it completely, and use map layer 1 as your bottom map layer.
You can load a backdrop slice and the put it underneath the map layers.
I can look up the exact commands to do this layer when I am not typing from my phone
First, map layer 0 is always opaque. Fortunately you can hide it completely, and use map layer 1 as your bottom map layer.
You can load a backdrop slice and the put it underneath the map layers.
I can look up the exact commands to do this layer when I am not typing from my phone
- Bob the Hamster
- Lord of the Slimes
- Posts: 7660
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
Okay! Here we go!
Here is the command to hide map layer 0
And here is the code that loads a backdrop, and places it underneath the map layers:
This should work, but I haven't tested it yet, so let me know if you have any problems.
The backdrop will not be automatically removed even when you switch maps, so you might need to use the "free slice" command on it yourself.
Here is the command to hide map layer 0
Code: Select all
variable(sl)
sl := lookup slice(sl:map layer0)
set slice visible(sl, false)
Code: Select all
variable(backdrop, maproot)
backdrop := load backdrop sprite(0)
maproot := lookup slice(sl:maproot)
move slice below(backdrop, maproot)
The backdrop will not be automatically removed even when you switch maps, so you might need to use the "free slice" command on it yourself.