How do I get player to slide under a object or check to see if player is under an solid oject?

1 favourites
  • 3 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • Hello

    I am trying to figure out how to get this player to slide underneath a solid object

    Pretty much what I am trying to do is if player performs a slide

    if there is no solid object over top of him

    then slide normally

    But if player is in a slide state but is underneath a slide object

    player should remain in slide state until the player is no longer underneath the solid object the exit slide state

    or if player is in slide state and exit the slide while underneath a solid object player dies

    I am trying to archive either of these scenarios

    I'd rather kill that player if he exits the slide while underneath an solid object

    But I am also unsure as too how to check for nearest objects the player is underneath or on top of

    video explanation and showing of what my problem is

    screencast.com/t/nK79XKsasV

    Screenshot of the code

    screencast.com/t/I941qAsdy9un

  • Half asleep and trying to look at your issue on my phone, but you could try and use is overlapping at offset to keep the slide state if your character is overlapping the sprite.

    If it is overlapping at offset - set the slide state

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks I tried the "is overlapping at offset" it appears not to be working but maybe its how I programmed it probably

    I am wondering if its the timer?

    I could give the timer a longer duration.

    but still game be a game breaking glitch if player is too far out and uses the slide feature and get stuck. I think I'd rather kill the player if he gets stuck

    any suggestions?

    video of me testing it

    screencast.com/t/LiYE7Jz7b

    here is the gamefile here controls are the default and slide key is z key

    spaces.hightail.com/space/eFn7u5kw4O

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