So in the game I'm working on, every character has their own style of textboxes defined in CSS. For example:
There's more to the code than that, but I'm at work, so that'll do. Now whenever I have a character speak, it looks like this:
<<pro $tom.profile>>$tom.name:<hr><<img $tom.img>>
Hello blah blah blah...@@
That works great. <<pro>> and <<img>> are macros I set up for handling profile and full size images easier. What I'd like to do is condense everything down to a single macro, however I can't seem to be able to get a variable to be accepted as a style.
<<nm $tom "Hello world">>
/* $tom.style = "tom" */
<<set _x = $args.style
<<pro $args.profile>>$args.name<hr><<img $args.img>>
I've tried writing this several different ways, including <div id=_x> but I cannot get the style to activate. Replacing _x with something like @@.tom works fine.
This is probably stupid user error, but I'd really appreciate some help!