***RESOLVED*** Disappearing platform issue.

0 favourites
  • 6 posts
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • Hey guys,

    I have a problem with a disappearing platform.

    I need the platform to only be present when a global variable equals a certain number.

    For example, it's there when somethingvariable = 1, but not when somethingvariable = 2.

    I need to do this without destroying it unless there's a way to destroy and create it in the exact same place/position with the appropriate variable value.

    So far I've been switching the solid and visible behaviours but when the platform disappears (through using solid/visible disabled) the platform acts solid but invisible while the player is standing on it but the minute they step off it's no longer solid. They can also jump off it in this state.

    Many thanks in advance.

    Mike

  • You could move the player up a pixel after setting solid disabled to "unstick" him. Or you could move the platform off the screen when var=2 and back into position when var=1.

  • There are going to be quite a few of them so I'd rather find a way that can keep them where they are.

    Affecting the player's movement is tricky as this effect can be used while the player is jumping so I want to avoid disrupting the jump by affecting them speed/position of the player.

    What I need is something that says, "look, mate. That block you were standing on before has gone. Wake up and fall now."

  • Move the platform down a pixel when you hide it and back up when you show it.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Moving the object one pixel up like ramones suggested is what I use for the wake up call you're talking about. When the platform change happens and the object is overlapping a platform, set the object's Y to Self.Y-1.

  • ***RESOLVED***

    Hey folks, sorry about the late reply, especially after you all responded so quickly.

    In the event that changes the variable that causes the blocks to disappear, I just added another event that set "Player.Y-1". As explained by all above, this "unstuck" the player object, nor does it interfere with the jumping of the character.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)