Problem description:
Hello, I was wondering if it was possible to have variables/escaped characters in a dmi definition. Essentially, I'm trying to define classes in a grid and have the mob define its icon based on the class name. Is this possible?
Aug 28 2012, 2:47 pm
|
|
Can you show us an example.
|
mob |
Is this anything helpful?
|
Not really. I'm trying to avoid defining the icon in an individual mob for the class, and instead calling the icon based on the name of the class (which is stored in Stats[40][1], just to be clear). Know of any way to use file() in the icon call?
icon = file(Stats[40][2]) |
Since you can't have embedded expressions between single quotes, what I usually do is build an associative list. The file() procs won't work here because they look for files in the host file's directory (single quotes grab icons compiled with the game).
It may not be pretty when you have a lot of stuff, but I don't recall a better way. var icons[] = list( |