Using Yanfly's Buffs and States Core for this. I want a state, when applied to or removed from an actor, to change a particular variable based on which actor it is on. My current notetag:
This doesn't seem to be working, though. When the state is on actor 1 (confirmed that it is, the little state icon is present and the state's other effects are working), the variable 302 remains unchanged.
Is the term "user.actorId" not correct for states? That was my initial thought but it seems to me that if that were the case, it would run through the conditional branches and then edit variable 332 (since none of the If clauses would read as true), but variable 332 remains unchanged too. Which leads me to think that there might be a syntax problem....
Code:
<Custom Apply Effect>
if (user.actorId == 1) {
$gameVariables.setValue (302, $gameVariables.value (302)+10)
}else if (user.actorId == 2) {
$gameVariables.setValue (312, $gameVariables.value (312)+10)
}else if (user.actorId == 3) {
$gameVariables.setValue (322, $gameVariables.value (322)+10)
}else{
$gameVariables.setValue (332, $gameVariables.value (332)+10)
}
</Custom Apply Effect>
<Custom Remove Effect>
if (user.actorId == 1) {
$gameVariables.setValue (302, $gameVariables.value (302)-10)
}else if (user.actorId == 2) {
$gameVariables.setValue (312, $gameVariables.value (312)-10)
}else if (user.actorId == 3) {
$gameVariables.setValue (322, $gameVariables.value (322)-10)
}else{
$gameVariables.setValue (332, $gameVariables.value (332)-10)
}
</Custom Remove Effect>
This doesn't seem to be working, though. When the state is on actor 1 (confirmed that it is, the little state icon is present and the state's other effects are working), the variable 302 remains unchanged.
Is the term "user.actorId" not correct for states? That was my initial thought but it seems to me that if that were the case, it would run through the conditional branches and then edit variable 332 (since none of the If clauses would read as true), but variable 332 remains unchanged too. Which leads me to think that there might be a syntax problem....