Hello all!
I'm trying to create a common event to get the monster id from the last monster acted on and add the actor of the same id to the party (yes, I'm trying to catch monsters as pets).
Looking at the MZ Script call reference I took the following:
Enemy ID - $gameTroop.members()[n].enemyId(), and
Last action data type - $gameTemp.lastActionData(type)
and tried to set variable 1 to that number using the script call:
$gameVariables.setValue(1, $gameTroop.members()[$gameTemp.lastActionData(5)].enemyId())
which is causing an error when I try to run it in game.
I assume I've done it incorrectly but can't figure out how it should be...
Any help would be greatly appreciated 🙂
I'm trying to create a common event to get the monster id from the last monster acted on and add the actor of the same id to the party (yes, I'm trying to catch monsters as pets).
Looking at the MZ Script call reference I took the following:
Enemy ID - $gameTroop.members()[n].enemyId(), and
Last action data type - $gameTemp.lastActionData(type)
and tried to set variable 1 to that number using the script call:
$gameVariables.setValue(1, $gameTroop.members()[$gameTemp.lastActionData(5)].enemyId())
which is causing an error when I try to run it in game.
I assume I've done it incorrectly but can't figure out how it should be...
Any help would be greatly appreciated 🙂