Over on the discord we've been coming up with a way of making a 2 tall player hide behind walls and came up with this.
on draw do
// put <tile> in foreground
tile_name = name event.px,event.py
if tile_name=="FORGROUND TILE" then
hide
end
end
In the test room above I changed some of the world tiles so they weren't solid
Then named the 3 tiles like so
on draw do
// put <tile> in foreground
tile_name = name event.px,event.py
if tile_name=="tile 21" then
hide
elseif tile_name=="tile 29" then
hide
elseif tile_name=="tile 13" then
hide
end
end
To get this result
This work is done by Drew-Lo#8012 & Neven on discord, I'm simply sharing it
Game attached
Foreground test.zip (4.3 KB)