- Joined
- Jun 1, 2009
- Messages
- 125
Hi! I have some questions about glorious Uncle's Grid system.
Q1. How one can make the grid showing up only at the buildable places? I've tried to add
but it failed (probably cause of poor synthax knowledge), the compiler returns me the error the any next line after endif.
Q2. how to detect a mouse right-click to stop the grid display? In my case, the grid shows up after the <build> button was pressed.
Q3. any additional hints about possible desyncs, leaks etc done by grid system?
Thanks in advance for your help!
The GUI map example file attached.
Q1. How one can make the grid showing up only at the buildable places? I've tried to add
JASS:
if (IsTerrainPathableBJ(GetLocationX(posX), GetLocationY(posY), t) == false) then
but it failed (probably cause of poor synthax knowledge), the compiler returns me the error the any next line after endif.
JASS:
for x = 0, width do
for y = 0, height do
posX = startX + x * 128
posY = startY + y * 128
if (IsTerrainPathableBJ(GetLocationX(posX), GetLocationY(posY), t) == false) then
SetImagePosition(img, posX, posY, 0)
img = CreateImage("Gridplane.dds",128,128,0,0,0,0,1,1,1,1)
SetImageRenderAlways(img, true)
SetImageColor(img, 255, 255, 255, 0)
gs_grid[id][i] = img
i = i + 1
endif
end
end
end
Q2. how to detect a mouse right-click to stop the grid display? In my case, the grid shows up after the <build> button was pressed.
Q3. any additional hints about possible desyncs, leaks etc done by grid system?
Thanks in advance for your help!
The GUI map example file attached.