So I recently thought it would be cool to change the colors of the texts of different monsters. Like, green means zombie, blue means ghoul, and so on. Is it possible?
Code I was hoping to change:
obj.critdesc = "A well-placed blow by #attacker# sends you reeling (#hits# hits)."
obj.attackdesc = "#Attacker# has hit you (#hits# hits)."
obj.missdesc = "#Attacker# misses you."
obj.look = ProcessText("A " + obj.alias + ", {random:covered in maggots:missing an arm:one eye hanging out}.")
Just put the text processor stuff in there, like this:
obj.critdesc = "{colour:blue:A well-placed blow by #attacker# sends you reeling (#hits# hits).}"
Alright. The code you put just isn't working. It does nothing.
The game is here. Maybe it just does that because my text is already fuchsia. (Pink...)
http://textadventures.co.uk/games/view/fo9bej7z0kqiy_wxal2tcq/fing-game
You've only added the {colour:
to the attackdesc/critdesc/missdesc attributes of the monsters.
Those strings are only used if the monster doesn't have a weapon, which is never true in your game.
The strings that get used are the ones for the monster's attacks, so those are the ones you need to add the colour to.
Alright! I got the attacks at least!
http://textadventures.co.uk/games/view/fo9bej7z0kqiy_wxal2tcq/fing-game