Create overlay from core images.
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.
Create overlay from core images.
I guess it's possible to create overlays from existing core images. For example, you can take the items/potion-red.png, shrink it and put it at the corner.
I'm not sure if anyone has done similar things through image path functions WML. Is there any codes that I can borrow?
I'm not sure if anyone has done similar things through image path functions WML. Is there any codes that I can borrow?
Re: Create overlay from core images.
I am doing exactly that in OoA. If you pick up an item (say, a sword) the following macro takes the image, shrinks it and places it in the top right corner above the unit sprite:
You might change values as needed
Code: Select all
#define ABILITY_ICON_OVERLAY IMAGE
[effect]
apply_to=overlay
add=misc/blank-hex.png~BLIT({IMAGE}~CROP(14,14,42,42)~SCALE(16,16),42,0)
[/effect]
#enddef
Re: Create overlay from core images.
Thanks, it works nicely.