Not sure if this counts as a "double post" exception or not, but I've got the basic structure programmed in. Unfortunately it's supposed to verify the matter based off the Yanfly skill core but seemingly it's like if even one enemy uses the skill (instead of all of them which it is
supposed to verify) that it triggers
without regard for how many enemies remain. I have each applicable troop set to count based on how many enemies there are using one variable, and the escape count is tracked with the other using a turn event (also in the applicable troops) that is programmed to report full evac which somehow isn't happening correctly.
The escape skill is set with the following notetag to calculate evac calls:
Code:
<After Eval>
$gameVariables.setValue(45) += 1
</After Eval>
Here are the variable definitions:
45 is the escape count, and 44 is the troop count. What I have next is a verification at turn end to verify that the two are equal:
Theoretically, I should only be getting the "runaway" result if the entire troop flees, but if even one leaves in my setup it's still triggering. Any idea of what's going on?
EDIT: Looks like I accidentally forgot to turn on most of the initial configurations, however I'm still having trouble.
EDIT 2: I have now determined through debugging that it's not adding up at all (meaning literally). Specifically, it's an "Invalid left-hand side in assignment" problem based on the console log.
EDIT 3: It would help if I had the formatting corrected. Here's the code as it should be:
Code:
<After Eval>
$gameVariables.setValue($gameVariables.value(45) + 1);
</After Eval>
EDIT 4: I now have it to where it's calculating things as it should, but end events is not triggering at all.