Scan ability

In order to make a scan ability I made a common event called scan


$gameTroop._enemies[BattleManager._action._targetIndex]

$gameMessage.add($gameTroop._enemies[BattleManager._action._targetIndex]._hp);

$gameMessage.add($gameTroop._enemies[BattleManager._action._targetIndex]._mp);

$gameMessage.add($gameTroop._enemies[BattleManager._action._targetIndex]._atk);

$gameMessage.add($gameTroop._enemies[BattleManager._action._targetIndex]._def);

$gameMessage.add($gameTroop._enemies[BattleManager._action._targetIndex]._mat);

$gameMessage.add($gameTroop._enemies[BattleManager._action._targetIndex]._mdf);

$gameMessage.add($gameTroop._enemies[BattleManager._action._targetIndex]._agi);

$gameMessage.add($gameTroop._enemies[BattleManager._action._targetIndex]._luk);

$gameMessage.add(

Only the HP and MP would show up.
How can I make the other stats or parameters show up?
1684715517452.png
Moved to: MZ Support

(Tutorials is for posting tutorials you have made, not for asking how to do something)
The problem is that you're adding an underscore in front of the properties, when there shouldn't be one. i.e. it should be atk instead of _atk:
JavaScript:
$gameMessage.add($gameTroop._enemies[BattleManager._action._targetIndex].atk);
The problem is that you're adding an underscore in front of the properties, when there shouldn't be one. i.e. it should be atk instead of _atk:
JavaScript:
$gameMessage.add($gameTroop._enemies[BattleManager._action._targetIndex].atk);
Thanks a ton!
If I wanted to add another message
for example displaying the words atk in addition to displaying the stat having the word there how would I add that
Moved to: MZ Support

(Tutorials is for posting tutorials you have made, not for asking how to do something)
thanks! will post there next time!
If I wanted to add another message
for example displaying the words atk in addition to displaying the stat having the word there how would I add that
JavaScript:
$gameMessage.add("Atk: " + $gameTroop._enemies[BattleManager._action._targetIndex].atk);
Ok
1684867918750.png


Congrats we did it. !

Original thread: https://forums.rpgmakerweb.com/threads/scan-ability.157704/