- Joined
- Nov 15, 2015
- Messages
- 193
- Reaction score
- 29
- First Language
- English
- Primarily Uses
So I'm on the verge of making a semi-okay way to replicate monster controlling (having a character charm a monster and control their exact actions). First I apply the charmed state. If successful, user gains skillset of that monster. I store the monster's index for later use with this note tag in the charmed state notebox:
<Custom Apply Effect>
var stateindex = target.index();
</Custom Apply Effect>
Then I use the following code in a skill to force that monster to use their skill on a target of my choice:
<After Eval>
BattleManager.queueForceAction($gameTroop.members()[stateindex], 284, -2);
</After Eval>
The error I get is that the stateindex is "never defined". This one's making me scratch my head.
<Custom Apply Effect>
var stateindex = target.index();
</Custom Apply Effect>
Then I use the following code in a skill to force that monster to use their skill on a target of my choice:
<After Eval>
BattleManager.queueForceAction($gameTroop.members()[stateindex], 284, -2);
</After Eval>
The error I get is that the stateindex is "never defined". This one's making me scratch my head.
