Print enemy states to console.

Hi.

How can i print all of an enemies states to the console?

would be really helpfull when debugging.

Thanks!
enemy.states.each {|state| p state.name}

I think that would work
Bit of a late reply but....

i got this error when runing the script.

Where are you calling this from? It will only work if you run it in a battle event.

Code:
$game_troop.members.each {|enemy|  p enemy.name  enemy.states.each {|state| p state.name}}
Where are you calling this from? It will only work if you run it in a battle event.

$game_troop.members.each {|enemy| p enemy.name enemy.states.each {|state| p state.name}}
Thanks muchly, that worked.

i was totally running it from a battle event the entire time tho.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/print-enemy-states-to-console.20301/