I'm using Game Maker and looking for help with these:

  1. I'd like to have invisible platforms and walkways for the player to move on. I want the platform to be slightly visible in this option so the player can find them but still be invisible while being fair to the player.

  2. Platforms are invisible, but a special item (like the Lens of Truth in Legend of Zelda: Ocarina of Time turns the invisible things visible within a given area for the time the player is using the item.


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.


Disable "visible" and enable "visible" when you need to. It is a built-in variable and it works well for your case.

If the platform is invisible type "visible = false", if it turns visible then "visible = true".

It is extremely easy.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.