how to make leveled attacks
TaylorH1
Member Posts: 8
I want my fighter to have more than one attack animation when he is hitting something. so like if you hit attack he swings his sword but if you hit attack two or three times the attack animation changes and he dose a bit more damage.
Any help would be great!
thanks.
Comments
@TaylorH1 How I would make that system I would either make three attributes or add three Integer cells to a table. Name one "Cooldown" one "HitCount" and the other "Animation". When you activate the Hit Button Change "Cooldown" to 1 and "HitCount" to (game.HitCount +1). also set timer so "Cooldown" will equal 0 after 1 second or whatever time you want the combo meter to go away. Every time you activate the Hit Button the "Cooldown" will reset the timer. Finally if the timer ever resets the "Cooldown" change "HitCount" to 0.
Now you make a rule that every time you press the Hit Button if [game.HitCount > 3] change "Animation" (that for continuity should be set to 1) to random 1-X (however many animation styles you have) then set the number back to one along side "Cooldown" and "HitCount" going to 0.
If this wasn't clear you set each animation to a number. If you don't want the base attack in with the power attack animation change "Animation" to random 2-X. Let me know if there is any part you need me to explain further.
in order
so first attack is one animation and the next is a different attack anination as long as its prest right after the first one
@TaylorH1 sorry i re-read your question and changed my comment to explain how I would do it read my first post then let me know if you have any questions.
@TaylorH1 also if this wasn't understood set the damage attribute to a greater number when [game.HitCount > 3]
could you explain in a bit more detail how to set up animation change. do you need to use tables for that part? cause I don't have tables.
@taylorH1 you don't need tables at all. I use them because it helps me keep track of my game and seems to help with performance however it makes things very hard to read. Anyways no basically you put in your animation blocks with a rule around each one saying if the attribute "Animation" is 1 play X, if "Animation" is 2 play Y and so on.
It will change every time you press the action button after the combo meter is > 3.
also you probably will need a cool down for whatever your action button is so they can't spam it, but it needs to be shorter than the combo cool down so they can keep spamming for combos.