mob
monster
icon = 'icons/monsters.dmi'
look_mob()
for(var/O as mob in oview())
usr << "[O.icon_state]" // this does not work but
// i need something like this that will work
usr << "You see: \a [O]"
Problem description:
i might be asking about something that can't be done, but i will ask anyways...
i have all the monsters in one .dmi file, with a name under each icon. when i run the code above and click the "look mob" verb, it outputs, "You see: monster" but is there a way to output the name of the icon. instead of the "You see: monster", it would output, "You see: wasp" if wasp was the icon_state of that icon.
Correction:Have you assigned an icon_state to the monsters you're checking?
However-
The easiest way to accomplish what you're trying to do is make a unique /monster/type for each monster and just define "name". Then pull O.name instead of fiddling with icon_state.
I mean, this looks like you're making things more complicated for yourself to make them look more organized.