Combo attack stacking without delay!

4

Attached Files

The following files have been attached to this tutorial:

.capx

stackedattacknodelay.capx

Download now 203.38 KB

Stats

3,869 visits, 6,103 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 2 Mar, 2015. Last updated 19 Feb, 2019

After a lot of trial and error (mostly error) I've made this small script that keeps track of how many attacks your character has stacked.

The script uses three variables

COMBO - ads +1 to COMBO for each loop, used mainly for animations

canStack - switches stacking off when timer is up

ATTACK - holds the amount of stacked attacks.

When player hits the attack button, ATTACK is increased +1 and a timer is started.

The timer gives the user a window in wich the user can stack another attack, when timer is up no more attacks can be stacked until the attackloop is finished.

When the ATTACK is greater then 0 the first attackanimation is activated.

When the animation is finished 1 is subtracted from ATTACK and 1 is added to COMBO.

If ATTACK = 0 the loop is finished, if not the next animation is started.

If your animations start at 0, change the global COMBO to 0.

If you want to stack more than 3 attacks, change the ATTACK not equal 3 in event 3 to new value.

You can also change the time a user gets to stack in event 3 by changing the timer value.

I've also made a previous tutorial on this subject but that one started with a timer delay before executing the first attack. Check it out Stacking with delay

Anyone good at making inventorys are welcome to pm some tips on how to make them, arrays aren't my thing but I'd like to learn!

Thanks for reading!

.CAPX

stackedattacknodelay.capx

Download now 203.38 KB
  • 0 Comments

Want to leave a comment? Login or Register an account!