Projectiles Offset Position

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
tommy2teeth
Posts: 46
Joined: February 28th, 2015, 8:30 pm

Projectiles Offset Position

Post by tommy2teeth »

I'm trying to add the {MISSILE_FRAME_FIRE_BREATH N_OFFSET_POSITION S_OFFSET_POSITION N_DIAGONAL_OFFSET_POSITION S_DIAGONAL_OFFSET_POSITION} macro to the demondog unit in the ME Era on the Infernai team. When I put everything at 0,0 it does not look like it comes out of the units mouth at all. I would also like to fix the dragon unit in EE Monster team, it has the same problem. How do you go about figuring out where to place the offset position?
User avatar
Astoria
Inactive Developer
Posts: 1007
Joined: March 20th, 2008, 5:54 pm
Location: Netherlands

Re: Projectiles Offset Position

Post by Astoria »

The offset positions are the distance (in pixels) from the center of the hex. You could try layering the fire breath sprite over the demondog sprite in a program like Gimp and seeing how far you need to move it for it to look good. Alternatively, you could try out values in-game, and tweak them until they look good. There's no real 'easy' way to do it without it being a chore as far as I know.
Formerly known as the creator of Era of Chaos and maintainer of The Aragwaithi and the Era of Myths.
User avatar
tommy2teeth
Posts: 46
Joined: February 28th, 2015, 8:30 pm

Re: Projectiles Offset Position

Post by tommy2teeth »

Thank you for the help but I'm still not having any success. Am I right to assume on a 72x72 image (normal wesnoth sized image) the center is 36x36? And any image left of 36X36 along the x axis should be a negative number? And any image below 36,36 along the y axis is a negative number also? Also should I flip the image horizontally to figure out the S OFFSET POSITION. Hope I made sense here because I do not know what I am doing.
Post Reply