Looking at the pieces one by one:
Invisible floor
You can make invisible floor tiles by choosing your usual floor image as the collision mask, and setting the object to have no sprite.
Partially transparent floor
You'll want to write a script for the object's Draw event, using draw_sprite_ext
, tuning the alpha
parameter to whatever works best (0
is completely transparent, 1
is completely opaque).
Lens of Truth
If you want the tiles to sometimes be visible and sometimes not (depending on a condition, you'll need to write a Draw event script with an appropriate conditional.
Something approximately like—
if ( obj_Player.hasLensOfTruth && distance_to_object(obj_Player) < 100 ) {
// Put a call to draw_sprite or draw_sprite_ext here
}
// ... Otherwise: Nothing is drawn.
That distance_to_object
is intended to check that the player is close enough. I imagine you'd have an instance variable hasLensOfTruth
set to true
when the player finds that item.
The first one (invisible floor) is doable without writing a GML script. I can't think of a way of doing the other two using only drag-and-drop actions, and you might need the Pro version for the partial transparency.