0 Favourites

How do I Stop my character to use a weapon?

  • While my character runs and swings his sword it shows the 'attack" animation but his feet to not move. Instead he slides. I guess this is because I need an animation that has him running while attacking. So instead of that I want him to stop and swing the sword, (like in Castlevania Simon Belmont will stop moving to swing the whip.) I'm trying to make an event that says: If the mouse is clicked and the direction arrow is pressed, stop moving, play "attack" animation. But since I am new to C2 I don't know what you call the "If" statements.

  • Hate to break it to you bud but Simon can't attack while walking. The thing with Castlevania is once you decide to do an action, you have to commit to it.

    What sets Castlevania apart from other similar Melee Action games (Zelda 2: Adventure of Link, Ninja Gaiden) is that there is no control over Simon once he jumps (can't control mid-air velocity) and attacks (has to go through the cycle of drawing back and whipping). Doesn't matter how fast your reaction time is.

    Simon Sprite Sheet: https://www.spriters-resource.com/nes/cv/sheet/8477/

    Now it's easy enough if the game were like Ninja gaiden since Ryu only has a 2-frame run cycle.

    I suggest you check out the sprite sheets of all these characters to understand how they play.

    Heck, the games can be played in online browsers now. They're worth revisiting.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • No you're going about this wrong.

    Stopping to attack

    _________________________

    On Right Arrow Pressed > Move Character

    X On Left Mouse Button Down > Set Animation " Walk "

    _________________________

    Attacking while running

    _________________________

    On Right Arrow Pressed > Move Character

    On Left Mouse Button Down > Set Animation " Walk_Attack"

    ________________________

    @MPPlantOfficial

    Subscribe to Construct videos now

    You can do anything.

  • Use a global variable trigger.

    When you are not attacking set it to a number and when you are attacking set it to a different number.

    On Key Press Left: Set animation player to "walk"

    Movement=1

    On Key Press Attack: Set Movement=0

    On Movement=0: Set animation "Attack

    ............................. Wait X seconds

    ............................. Set Movement=1

    That way your player will not move when attacking.

  • Use a global variable trigger.

    When you are not attacking set it to a number and when you are attacking set it to a different number.

    On Key Press Left: Set animation player to "walk"

    Movement=1

    On Key Press Attack: Set Movement=0

    On Movement=0: Set animation "Attack

    ............................. Wait X seconds

    ............................. Set Movement=1

    That way your player will not move when attacking.

    Yeah the animation stops but when I press the right arrow while attacking the player still slides left and right just no walking animation.

  • > Use a global variable trigger.

    >

    > When you are not attacking set it to a number and when you are attacking set it to a different number.

    >

    > On Key Press Left: Set animation player to "walk"

    > Movement=1

    >

    > On Key Press Attack: Set Movement=0

    >

    > On Movement=0: Set animation "Attack

    > ............................. Wait X seconds

    > ............................. Set Movement=1

    >

    > That way your player will not move when attacking.

    >

    Yeah the animation stops but when I press the right arrow while attacking the player still slides left and right just no walking animation.

    What movement control are you using?

    You can set controls to disabled for platformer and 8 direction movement control.

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