1 decade ago by ShawnSwander
So what I want to do is have an entity set a text message based on it's attributes and draw it to the screen
I need the entity to set the Message, color, and location the end effect is above the entity its name will show up and the color will indicate if its a hostile or friendly creature entity.
I actually trigger it by mouseover so only 1 should show up at a time.
EDIT: SORRY, just realized font is drawn relative to screen and not map... fixed it.
heres my code if interested
I've set the variables globally.
I need the entity to set the Message, color, and location the end effect is above the entity its name will show up and the color will indicate if its a hostile or friendly creature entity.
I actually trigger it by mouseover so only 1 should show up at a time.
ig.font[entity.fontcolor].draw(entity.message,entity.pos.x,entity.pos.y)
EDIT: SORRY, just realized font is drawn relative to screen and not map... fixed it.
heres my code if interested
if (ig.game.player.entitymessage ==true){ ig.game.font.black.draw( ig.game.player.mouseover.message, ig.game.player.mouseover.pos.x+2, ig.game.player.mouseover.pos.y+2 ); ig.game.font[ig.game.player.mouseover.fontcolor].draw( ig.game.player.mouseover.message, ig.game.player.mouseover.pos.x, ig.game.player.mouseover.pos.y ); } ig.game.player.entitymessage = false;
I've set the variables globally.