Trying to rewrite this using local variables and I don't have any references on hand as to the correct syntax. This is the code I am modifying:
So it should say
But I am getting NaN as a response. So clearly I am inputting the syntax wrong. Any help would be appreciated 😅
One other question however while I am at it. I need this result to be saved in between turns on the actor who has the state. Should I be using const here instead of var? Multiple actors will potentially have this state at the same time, so I need the result to be unique per actor, rather than per instance of it being run.
Code:
<Custom React Effect>
$gameVariables.setValue(41, $gameVariables.value(41) + 1);
if ($gameVariables.value(41) >= 2) {
$gameVariables.setValue(42, 1)
}
</Custom React Effect>
So it should say
Code:
<Custom React Effect>
var mindsEye = Sum(mindsEye, + 1);
if (mindsEye.value >= 2) {
var mindsEyeResult = 1
}
<Custom React Effect>
But I am getting NaN as a response. So clearly I am inputting the syntax wrong. Any help would be appreciated 😅
One other question however while I am at it. I need this result to be saved in between turns on the actor who has the state. Should I be using const here instead of var? Multiple actors will potentially have this state at the same time, so I need the result to be unique per actor, rather than per instance of it being run.