So I'm really confused. I have the YEP Skill_Core and Core_Engine. I saw someone post a thread back in 2018 similar to this problem I'm having, but my issue is a bit different.
I copied the code to try and use it for my variable. The variable I use progressively gets higher every second as I walk around or perform turns in battle and I want the skill to use this variable as the cost. However when I try this code, in the menu it displays the cost correctly, but when I look at it in the skills menu (Overworld or in battle), it instantly decreases the variable down no matter if I use it or not.
I don't understand what's wrong with the code. So here's the basic gist of what I want it to do:
Blood Strike
Costs 50 Blood
VariableID for blood is 1
<Custom Requirement>
if ($gameVariables.setValue(1) >= 50)
{
value = true;
} else {
value = false;
}
</Custom Requirement>
<Custom Execution>
$gameVariables.value(1,$gameVariables.value(1) - 50);
</Custom Execution>
<Cost Display Eval>
var variableId = 1;
var value = 50;
$gameVariables.setValue(variableId, value);
</Cost Display Eval>
<Custom Cost Display>
\c[30]\v[1]\c[30] Blood
</Custom Cost Display>
I copied the code to try and use it for my variable. The variable I use progressively gets higher every second as I walk around or perform turns in battle and I want the skill to use this variable as the cost. However when I try this code, in the menu it displays the cost correctly, but when I look at it in the skills menu (Overworld or in battle), it instantly decreases the variable down no matter if I use it or not.
I don't understand what's wrong with the code. So here's the basic gist of what I want it to do:
Blood Strike
Costs 50 Blood
VariableID for blood is 1
<Custom Requirement>
if ($gameVariables.setValue(1) >= 50)
{
value = true;
} else {
value = false;
}
</Custom Requirement>
<Custom Execution>
$gameVariables.value(1,$gameVariables.value(1) - 50);
</Custom Execution>
<Cost Display Eval>
var variableId = 1;
var value = 50;
$gameVariables.setValue(variableId, value);
</Cost Display Eval>
<Custom Cost Display>
\c[30]\v[1]\c[30] Blood
</Custom Cost Display>