- Joined
- Nov 22, 2006
- Messages
- 1,260
Hi, I wanted to create a trackable on every grid in map, but I don't think they're created.......can you perhaps see why? (This is vJass)
Don't mind that trigger.
JASS:
struct Trackable_Data
trackable t
real x
real y
static method create takes real x, real y, trigger t returns Trackable_Data
local Trackable_Data td = Trackable_Data.allocate()
set td.t = CreateTrackable("4x4Trackable.MDX", x, y, 0)
set td.x = x
set td.y = y
call SetCSData(t, td)
return td
endmethod
endstruct
private function Init_UndeadArchery takes nothing returns nothing
local Trackable_Data td
local trigger t = CreateTrigger()
local real x1
local real x2 = GetRectMaxX(bj_mapInitialPlayableArea) - 64
local real y1 = GetRectMinY(bj_mapInitialPlayableArea) + 64
local real y2 = GetRectMaxY(bj_mapInitialPlayableArea) - 64
loop
exitwhen y1 > y2
set x1 = GetRectMinX(bj_mapInitialPlayableArea) + 64
loop
exitwhen x1 > x2
set td = Trackable_Data.create(x1, y1, t)
set x1 = x1 + 128
endloop
set y1 = y1 + 128
endloop
endfunction
Don't mind that trigger.
Last edited: