danarchy1985
Member
Ok I'm making a game. I'm stuck on how to do the combo system. I have attack, attack_2, and attack_3. Everything is in an array. So for example in the idle state script I have
function player_idle_state(){
//get input
get_input()
//calculate movement
calc_movement()
//check state
if hsp != 0 state = states.WALK
if attack {
state = states.ATTACK
image_index = 0
}
if attack_2 {
state = states.ATTACK_2
image_index = 0
}
if attack_3 {
state = states.ATTACK_3
image_index = 0
}
//apply movent
collision()
//apply animation
anim()
}
So how would I set a combo system up?
function player_idle_state(){
//get input
get_input()
//calculate movement
calc_movement()
//check state
if hsp != 0 state = states.WALK
if attack {
state = states.ATTACK
image_index = 0
}
if attack_2 {
state = states.ATTACK_2
image_index = 0
}
if attack_3 {
state = states.ATTACK_3
image_index = 0
}
//apply movent
collision()
//apply animation
anim()
}
So how would I set a combo system up?