- Joined
- Jun 20, 2017
- Messages
- 380
The question is, how can I add an image on my map? For example, I try to create a legendary map(the world map), and then put the image on the floor to sketch it. However, the image should be the size of the entire map, so if the size of the map is 480x480, the image size should be the same?
JASS:
function CreateImageEx takes string imagePath, real size, real x, real y, real z, boolean showImage returns image
local image i = CreateImage(imagePath, size, size, 0, x - (size / 2), y - (size / 2), z, 0, 0, 0, 2)
call SetImageRenderAlways(i, true)
call ShowImage(i, showImage)
return i
endfunction
function CreateImageExLoc takes string imagePath, real size, location whichLocation, real z, boolean showImage returns image
return CreateImageEx(imagePath, size, GetLocationX(whichLocation), GetLocationY(whichLocation), z, showImage)
endfunction
Untitled Trigger 001
Events
Time - Elapsed game time is 0.00 seconds
Conditions
Actions
Set tmpPoint = (Center of (Playable map area))
Custom script: set udg_tmpImage = CreateImageExLoc["war3mapImported\high-resolution-world-maps-2.blp" udg_tmpPoint,0,true]