lukezero's Forum Posts

  • Now I'm trying to make a descending diagonal attack, like Shinobi 3.

    ErekT, I'm trying to do it using the same principles that you shared with us, but now using the "down" and "attack" buttons as triggers.

    I still cannot get it to work properly. Does anyone have suggestions?

  • any capx please?

    Sorry dude, in that case, I cannot share my CAPX with you because it's all my game project.

    However, we described exactly in this thread what has to be done.

    If you have any questions, feel free to ask.

  • Hey, glad you figured it out. Was away or I would have replied earlier. Anyways, since you're using the platform behaviour you shouldn't use dt. All behaviours use delta time automatically.

    Thanks one more time, ErekT!

    Now I'm using the DT with the platform behaviour. Do you think this could lead to a problem?

  • I did it!

    The problem was just the condition to finalize the dashing attack, that before was the end of the dash attack animation and now is the zero velocity. I still don't understand why the C2 didn't allow the operation by the end of the animation. If anyone can explain, I'm open to explanations.

    Thanks everyone! ^_^

  • I'm almost there, after deactivate/activate some Character moviment groups.

    I'm so rusty...

  • Assuming you've structured your game logic something like this...

    Each fighter uses states for different actions and attack moves i.e.:

    Fighter.State == STATE_RUNNING, STATE_ATTACKING, etc...

    Fighter.AttackType == ATTACK_DASH, ATTACK_PUNCH, ATTACK_KICK, etc...

    ... you can check the state and determine an attack from that:

    > // someplace that runs every tick
    if (Player.State == STATE_RUNNING)
             if (KeyDown(KEY_PUNCH))
                    Player.State = STATE_ATTACKING;
                    Player.AttackType = ATTACK_DASH;
    
    // reduce movement speed while doing the dash attack
    if (Player.State == STATE_ATTACKING && Player.AttackType == ATTACK_DASH)
             if (Player.MoveSpeed > 0)
                    Player.MoveSpeed = Player.MoveSpeed - 0.5*dt;
             else
                    Player.MoveSpeed = 0;
    [/code:3j3a9agt]
    

    I tried here and unfortunately don't worked well.

    Does anyone have a CAPX example with a "dashing attack" functional?

  • I still haven't been able to do it. I don't know where I'm going wrong.

    The attack during the race has to slow down until it stops completely in a short time. The animation of the attack remains until the speed reaches zero, changing to the normal state of the character next.

    Note: The problem here wasn't the difference of the animation DashAttack and RunAttack.

  • Assuming you've structured your game logic something like this...

    Each fighter uses states for different actions and attack moves i.e.:

    Fighter.State == STATE_RUNNING, STATE_ATTACKING, etc...

    Fighter.AttackType == ATTACK_DASH, ATTACK_PUNCH, ATTACK_KICK, etc...

    ... you can check the state and determine an attack from that:

    > // someplace that runs every tick
    if (Player.State == STATE_RUNNING)
             if (KeyDown(KEY_PUNCH))
                    Player.State = STATE_ATTACKING;
                    Player.AttackType = ATTACK_DASH;
    
    // reduce movement speed while doing the dash attack
    if (Player.State == STATE_ATTACKING && Player.AttackType == ATTACK_DASH)
             if (Player.MoveSpeed > 0)
                    Player.MoveSpeed = Player.MoveSpeed - 0.5*dt;
             else
                    Player.MoveSpeed = 0;
    [/code:2ez2pkc9]
    

    Thanks so much, ErekT!

    I used Functions and Boolean variables to set the player's mechanics and movements.

    Do you think that String variables is more effective?

    It's worth emphasizing that my game mixes characteristics of the platform and beat 'em up genres. My character has several abilities such as attack, concentrated attack, combo attack, double jump, run, slide, climb and pick up impulse on the walls.

    I confess that I had forgotten to apply the Delta Time to the platform states, but I'll test now.

    Soon I'll tell you what happened here.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    I understand. I think the cooldown system I suggested would do that.

    So if the player is clicking or tapping too slow the player will not get the special attack.

    If the player is doing fast according to the cooldown rules, then this attack happens and you can choose exactly what happens such as slowing down the player speed during the attack as you wanted.

    Sure, dude.

    It could be useful.

    Thanks one more time.

  • Hi,

    I will try.

    Isn't it simply creating 2 GLOBAL variables such as Cooldown_1 and Cooldown_2

    because I imagine you want your combo attacks to require fast pressing of a specific instance

    Then you can say on press #1 you do your attack and also set Cooldown_1 to say 0.5 seconds

    Then if Cooldown_1 = 0.5s action Wait 0.5s and set Cooldown_1 = 0

    Then on press #2 AND IF Cooldown_1 = 0.5s then do your 2nd attack and set Cooldown_2 to 0.5s

    Then if Cooldown_2 = 0.5s action Wait 0.5s and set Cooldown_2 = 0

    Then on press #3 AND IF Cooldown_2 = 0.5s then do your 3rd attack

    There you go

    Thanks for your collaboration,

    What I'm trying to implement is a player's character attack during a running (made with two taps on the left or right directional). When deployed, this attack would quickly decelerate the character until it stopped him. That's why I mentioned the example of Axel's Grand Upper.

  • Nothing yet.

  • Hi guys! ^^

    How is the best way to make a good dash attack (two taps + attack button), typical of fighting games like Captain Commando and Streets of Rage?

    Example:

    Note: I successfully did the two taps move (run) in my game prototype. Now I cannot do an attack during the run.

    Thanks!

  • I've been developing games in Construct 2 for a while and I've learned a lot from video tutorials found on YouTube. I created this topic in thanks to its authors and also to give good references to who is studying this excellent engine.

    Here is the list below and good studies! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    DevVlog - Criação de Jogos

    Description: This brazillian guy is recreating the classic MegaMan X identically and at the same time proving how good (and complex) C2 can be. Although it doesn't have a very good didactics, it provides the CAPX for studies.

    https://www.youtube.com/channel/UCC0RqW ... d_HIsxRZDg

    GoldSkull

    Description: Great tutorials on various gaming genres in C2.

    https://www.youtube.com/channel/UC606Lz ... DJcIFqb-5Q

    desKompliKa Cursos

    https://www.youtube.com/channel/UCMRu-y ... AKWI8bGfiQ

    Polar Games

    https://www.youtube.com/channel/UCOtOH4 ... B_zj9tPDtA

    jogosgratispro.com

    https://www.youtube.com/user/jogosgratispro/featured

    DG Cursos

    https://www.youtube.com/user/dgcursos

    Perametade Games

    https://www.youtube.com/channel/UCtUvXC ... A/featured

  • You can add global variable movement and increment it by 1 on touch/click, when it gets to 2. Then add a second variable called stamina and set it to 100, when movement is at 2 and lets says say every 0.1 second, decrement the stamina by 1, when it gets to 0, stop the movement. You will need 3 events to implement it.

    Thanks, dude.

    I'm trying something here.

  • I'm almost there, but now i'm also trying to implement a stamina bar to limitate the running.