I'm using Yanfly's Auto-Passive States to create passive states that activate when an actor wears a certain number of equipment of a single armor type. Preferably, I would like the state to take effect immediately when placing the necessary amount of armor on the actor. The code at this moment is below.
Looking in the console, I keep getting "TypeError: Cannot read property 'atypeId' of null", which means that user is undefined. Based on other threads I've read, it would seem that user isn't defined until battle is initiated.
I think the script call that I should be using instead would be
<Custom Passive Condtition>let typeMatch = 0;for (let i = 1; i < 4; i++) { if (user.equips()[i].atypeId === 1) { typeMatch += 1; }}if (typeMatch < 2) { condition = false;} else { condition = true;}</Custom Passive Condition>Looking in the console, I keep getting "TypeError: Cannot read property 'atypeId' of null", which means that user is undefined. Based on other threads I've read, it would seem that user isn't defined until battle is initiated.
I think the script call that I should be using instead would be
$gameActors.actor(x).equips()[i].atypeId, where x is the relevant Actor's ID. Is there a script call or set of script calls that would allow me to access the relevant Actor's ID from the note tag? Or am I going about this all wrong?