How do I force crouching when necessary, and get back up?

  • i did this for crouch:

    imgur.com/a/LpgHs

    as a solution when the mask goes into the tile and gets stuck i added "if it overlaps with tile, go back to crouch size" to it and then it wouldnt let me "get up" or resize back at all obviously

    i was thinking of adding "if it overlaps with tile, go back to crouch size and check for collusion every second" but i dont know how to achieve that in C2 yet, though even if i did it would look bad in game, character trying to get back for a frame constantly if... u know. I'm in dire straights here

    what can i do gents

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use "Overlapping at offset" event.

    If your character is crouching, on every tick check if its "Is Overlapping Ceiling at offset (0,-10)" for example.

    If overlapping, remain crouching, else set full size.

    Or probably an easier solution would be this:

    On every tick
       Character set size (full)
       Character Is overlapping Ceiling -> Character set size (crouching)
    [/code:pkpi2kge]
    
    Because it's done in one tick, the character will only be rendered once - either standing or crouching.
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)