Uncle
Warcraft Moderator
- Joined
- Aug 10, 2018
- Messages
- 7,866
So I'm creating a grid system for a turn based rpg and I'm running into issues with sizing some Images. The images are Arrows which will visualize the path that your unit takes when moving along the grid.
I'm already using a Grid image from this Grid System which works fine:
It's my own Images that are causing problems.
My ArrowStart image (as well as some other images that I left out) have the incorrect X-size:
However, my ArrowHead image is working fine - see the "example" picture to get a better idea of what I mean:
I attached an example picture that should help clarify things as well as the files that I'm working with. The Arrow images were all created in Photoshop with 128x128 pixel size and saved as .DDS files. The save format was DXT5 with the Alpha Channel set to Transparency.
Any ideas? I'm not really sure what I'm supposed to type in for some of the CreateImage parameters... I'm getting really weird results when messing with different values.
Also, does Z height work for Images? I can't seem to get it to work.
I'm already using a Grid image from this Grid System which works fine:
Lua:
local g = CreateImage( "Gridplane.dds", 128, 128, 0, 0, 0, 0, 1, 1, 1, 1 )
SetImagePosition( g, x, y, 0 )
SetImageRenderAlways( g, true )
It's my own Images that are causing problems.
My ArrowStart image (as well as some other images that I left out) have the incorrect X-size:
Lua:
local g = CreateImage( ArrowStart, 128, 128, 0, 0, 0, 0, 64, 64, 0, 1 )
SetImagePosition( g, TileXCoord[1], TileYCoord[1], 0 )
SetImageRenderAlways( g, true )
However, my ArrowHead image is working fine - see the "example" picture to get a better idea of what I mean:
Lua:
local g = CreateImage( ArrowHead, 128, 128, 0, 0, 0, 0, 64, 64, 0, 1 )
SetImagePosition( g, TileXCoord[7], TileYCoord[7], 0 )
SetImageRenderAlways( g, true )
I attached an example picture that should help clarify things as well as the files that I'm working with. The Arrow images were all created in Photoshop with 128x128 pixel size and saved as .DDS files. The save format was DXT5 with the Alpha Channel set to Transparency.
Any ideas? I'm not really sure what I'm supposed to type in for some of the CreateImage parameters... I'm getting really weird results when messing with different values.
Also, does Z height work for Images? I can't seem to get it to work.
Attachments
Last edited: