I am attempting to build an "Identify" battle skill that creates a message box displaying the contents of a targeted enemy's Notes field which I can then fill with whatever text I want.
I am having trouble with getting the targeting to work.
This script brings up the message fine in my test event, with variable 12 just needing to be set to an enemy's id.
It also runs fine in battle if I manually set the variable beforehand.
The problem comes in trying to get it to set the variable to a targeted enemy's Id.
The Identify skill is set to run a common event:
I have tried both:
$gameVariables.setValue(12, b.enemyId()); $gameMessage.add($dataEnemies[$gameVariables.value(12)].note);
and
$gameVariables.setValue(12, target.enemyId()); $gameMessage.add($dataEnemies[$gameVariables.value(12)].note);
Both return:
ReferenceError
b (or target) is not defined
What am I missing here?
Plugins: Casper Gaming - CGMZ Core, CGMZ Crafting. HimeWorks - Extra Equip Slots.
I am having trouble with getting the targeting to work.
This script brings up the message fine in my test event, with variable 12 just needing to be set to an enemy's id.
It also runs fine in battle if I manually set the variable beforehand.
The problem comes in trying to get it to set the variable to a targeted enemy's Id.
The Identify skill is set to run a common event:
I have tried both:
$gameVariables.setValue(12, b.enemyId()); $gameMessage.add($dataEnemies[$gameVariables.value(12)].note);
and
$gameVariables.setValue(12, target.enemyId()); $gameMessage.add($dataEnemies[$gameVariables.value(12)].note);
Both return:
ReferenceError
b (or target) is not defined
What am I missing here?
Plugins: Casper Gaming - CGMZ Core, CGMZ Crafting. HimeWorks - Extra Equip Slots.