I'm working on a game with active dodging and countering during enemy turns. I have came up with this code to start with, using SRD Sequence Inputs, but it's not working right.
The idea is that you can hold down a button to guard and take reduced damage, or you can risk being vulnerable to parry. Variable 6 in the sequence input is the parry command, and Variable 11 is a damage modifier that is applied and changes if the player is holding the guard button. Switch 25 changes if the player takes damage of any kind, and by the end of the attack, the player counters if it is still on.
Any help to improve this code would be appreciated. Thanks.
Code:
$game_switches[25] == true
$gameVariables.value(11) == 1
START SEQUENCE INPUT: ok, 6
attack animation: target
wait for animation
END SEQUENCE INPUT
if (Input.isPressed('shift')
SE: Blow1
wait: 5
$gameVariables.value(11) == 0.5
action effect
wait: 5
$game_switches[25] == false
elif $gameVariables.value(6) < 5
action effect
wait: 5
$game_switches[25] == false
else
SE: Sword2
motion guard: target
wait: 5
end
if $gameSwitches(25) == true
SE: Attack1
wait: 5
motion attack: target
wait 5
animation 2: target
attack effect: user
end
The idea is that you can hold down a button to guard and take reduced damage, or you can risk being vulnerable to parry. Variable 6 in the sequence input is the parry command, and Variable 11 is a damage modifier that is applied and changes if the player is holding the guard button. Switch 25 changes if the player takes damage of any kind, and by the end of the attack, the player counters if it is still on.
Any help to improve this code would be appreciated. Thanks.