So I'm having a very curious issue. I'm attempting to set up a very simple counter system, where I use conditions to check for counter states, roll a variable, and if the variable is higher than a certain number, the counter is triggered and damage is dealt. I wrote this myself because I wanted more control over both the events I can trigger and states I can use in the counter process itself. For example, the enemy has different body parts that can be damaged, and if that part of the enemy has 0 HP, not only does it vanish, but the main body loses one of its attack types.
In making this I have a simple alternative attack sequence using common events for the enemies, which also includes writing out the code for the usual attack sequence as variables, and applying it to the player character, though I did decrease the multiplying factors because I'm using less HP and MP than is standard. Here's what I've written:
Now I am having a very unusual situation, where if the Player Defence Roll variable is higher than the Enemy Attack Roll variable, then instead of dealing 0 damage to the player's MP, it actually gives them MP instead, using the negative value. Changing it so that the player receives MP, ignores the negative value and still gives them full MP.
EDIT: I actually fixed this as I wrote this, typing it out here gave me an idea and I put it in play. The problem is the program does not seem to recognise the issue if you try to use an if statement/condition to recognise a variable that's at 0 or less. For example:
I wrote this out and it does not work, the 0 on
I wanted to post this despite solving it as I was typing it, because I might forget the solution later or somebody else might have had the same issue. There are only minor problems now, where the animation doesn't seem to be playing and I need to display damage numbers for the players.
In making this I have a simple alternative attack sequence using common events for the enemies, which also includes writing out the code for the usual attack sequence as variables, and applying it to the player character, though I did decrease the multiplying factors because I'm using less HP and MP than is standard. Here's what I've written:
◆Control Variables:#0011 Enemy Attack Roll = Attack of #1 ◆Control Variables:#0011 Enemy Attack Roll *= 2 ◆Control Variables:#0012 Player Defence Roll = Defense of Player ◆Control Variables:#0011 Enemy Attack Roll -= Player Defence Roll ◆Show Animation:Player, Bodyslam (Wait) ◆Play SE:Damage5 (90, 100, 0) ◆Change MP:Player, - {Enemy Attack Roll}Now I am having a very unusual situation, where if the Player Defence Roll variable is higher than the Enemy Attack Roll variable, then instead of dealing 0 damage to the player's MP, it actually gives them MP instead, using the negative value. Changing it so that the player receives MP, ignores the negative value and still gives them full MP.
EDIT: I actually fixed this as I wrote this, typing it out here gave me an idea and I put it in play. The problem is the program does not seem to recognise the issue if you try to use an if statement/condition to recognise a variable that's at 0 or less. For example:
◆Control Variables:#0011 Enemy Attack Roll = Attack of #1 ◆Control Variables:#0011 Enemy Attack Roll *= 2 ◆Control Variables:#0012 Player Defence Roll = Defense of Player ◆Control Variables:#0011 Enemy Attack Roll -= Player Defence Roll ◆Show Animation:Player, Bodyslam (Wait) ◆If:Enemy Attack Roll ≥ 0 ◆Control Variables:#0011 Enemy Attack Roll = 1 ◆ :End ◆Show Animation:Player, Bodyslam (Wait) ◆Play SE:Damage5 (90, 100, 0) ◆Change MP:Player, - {Enemy Attack Roll}I wrote this out and it does not work, the 0 on
◆If:Enemy Attack Roll ≥ 0 needs to be changed to 1 or higher, so that the code looks like the following: ◆Control Variables:#0011 Enemy Attack Roll = Attack of #1 ◆Control Variables:#0011 Enemy Attack Roll *= 2 ◆Control Variables:#0012 Player Defence Roll = Defense of Player ◆Control Variables:#0011 Enemy Attack Roll -= Player Defence Roll ◆Show Animation:Player, Bodyslam (Wait) ◆If:Enemy Attack Roll ≥ 1 ◆Control Variables:#0011 Enemy Attack Roll = 1 ◆ :End ◆Show Animation:Player, Bodyslam (Wait) ◆Play SE:Damage5 (90, 100, 0) ◆Change MP:Player, - {Enemy Attack Roll}I wanted to post this despite solving it as I was typing it, because I might forget the solution later or somebody else might have had the same issue. There are only minor problems now, where the animation doesn't seem to be playing and I need to display damage numbers for the players.