How do i Add: Freeze Debuff to my Playable Character and have him still croucth after being unfrozen

0 favourites
  • 5 posts
From the Asset Store
ADD ME ALL
$29 USD
A super duper mental math activity to practice addition with unlimited combinations.
  • so i got a character with Platform Behavior (with Customized Controls)

    when he gets hit by this Sprit, lets call it Frostbite

    The player freezes, this disables all Controls, as i set it to "Ignore Imput" in which the only thing that would work will be the Players "Fall Speed"

    The Freeze debuff is started by a Boolean added to the Character Called "FreezeDebuff"

    and has a Instance Variable Called "FreezeDebuffDuration" that Subtracts 0.1 every 0.1 seconds from Duration, 3 is added to "FreezeDebuffDuration" on Collission with Frostbite.

    after the Duration has reached 0, the character Unfreezes and is able to Walk, Run, Hit, jump and Croutch.

    Now heres where the Problem is:

    if i where to hold down "Down Arrow" to Croucth and get hit by Frostbite, it would do as it normally would with other actions, be suspended in animation (i also set it to "Stop Animation") when Frozen, But when im in Croutch Animation while Frozen, and then being Unfrozen again When Duration expires, the animation of the player goes to Idle (The default Animation when not moving) even when im Still holding down "Down Arrow"

    Also Conditians For Croutching:

    Keyboard: Akeys.AT(Key_Croutch,K_code) is Down

    Character is Not moving

    Character is Not: FreezeDebuff

    Keyboard:Akeys.AT(Key_Croutch,K_code) on Released

    Character is Not: FreezeDebuff

    i really hope this didnt make anyones heads explode and that there someone out here who can help me out.

    Tagged:

  • As soon as you get frozen the debuff is true so the crouching logic will be false. Since you want him to remain crouched maybe you should remove that condition that debuff is false (though really once the freeze ends this should work and revert to crouch in theory) I didn't understand the bit about releasing the crouch key.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • well Heres the thing, i didnt make a Boolean for Croutching, the character just Croutches when the "Arrow down" Button is Pressed down. and then when i sat it to realese the character gets up again.

    should i add a Boolean for that as well and adjust it to croutching when the Boolean is active for it to work along with the Freeze Boolean?

  • If it is just set to crouch when button is down then it should work really because this would run constantly.

  • I got it Solved, turned out the issue did not come from Croutching actions or Freeze Actions but from one of the attack codes, and it works perfectly now, thank you for your help anyway ^^

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