Combo sword attack?

Hey there! I’m new on the forums but not new to makecode and I was wondering if there was any extentions or tactics I could use for a combo sword attack. I wanted to know so I could make a Metroidvainia rouglike similar to Dead Cells

4 Likes

There is a ‘button combinations’ extensions you can find in the extensions tab!

2 Likes

There is the button combination extension. If what you mean is like A+B or B+ up key.

2 Likes

Both great suggestions but I have already tried those. I need some way of making an attack that has multiple parts. Here is an example
Example I realize i’m being pretty vauge with my question, but there isn’t really a way to say it, its something that needs to be seen.

3 Likes

You could set a combo variable, like so

if(Combo == 1){
    DoComboSlash1()
    Combo++
} else if (Combo == 2){
    DoComboSlash2()
    Combo++
} else if (Combo == 3){
   DoComboSlash3()
   Combo = 1
}
3 Likes

Is there any way to do this in blocks? (I’m not that good at Java and Python is a foreign languge to me :sweat_smile:)

3 Likes

Not sure if this applies to Makecode, but the way I did a combo mechanic in another game engine using timers and the logic basically goes like this:

  1. When hitting the attack button, player will attack (using the first combo move) and a timer will go off.
  2. If the player hits the attack button during the timer, the second move in the combo will happen.
  3. If not, the player will have their combo move counter set to 1 again, meaning that when they attack again they will use the first combo move.
  4. Again for 2, if the player hits the attack button during the second timer then the 3rd combo will occur and so on.

basically: when u attack, a timer goes off and if u attack while the timer is going then you can continue the combo. if not, then the combo restarts.

4 Likes

Yes I agree with @PixelDoodle and you could also use percents with different animations for each percent.

5 Likes

Thanks dudes! I will Upload the game in spurts. Expect to see the start up tommorow.

2 Likes

Okay “A Travler’s Tale” has officially kicked off as my latest project! Here’s the opening! (please do not use for your own game!) A Travlers Tale

2 Likes