- Joined
- Feb 11, 2011
- Messages
- 1,860
Hi guys,
This is probably something that I should know, but I don't
How can I get pre-placed units in vJASS? I have tried this:
But it gives errors. I've also tried with a 0.0 timer, but with the same errors. The main error that I can't solve:
Undeclared variable: gg_unit_h001_0002
It happens in this function:
Any help would be appreciated
Thanks,
Mr_Bean
This is probably something that I should know, but I don't
How can I get pre-placed units in vJASS? I have tried this:
JASS:
scope TestSystem initializer OnInit
private function OnInit takes nothing returns nothing
local unit u = gg_unit_h001_0002
endfunction
endscope
But it gives errors. I've also tried with a 0.0 timer, but with the same errors. The main error that I can't solve:
Undeclared variable: gg_unit_h001_0002
It happens in this function:
JASS:
function CreateUnitsForPlayer0 takes nothing returns nothing
local player p= Player(0)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_H000_0001=CreateUnit(p, 'H000', - 205.2, - 560.6, 270.000)
call SetHeroLevel(gg_unit_H000_0001, 10, false)
call SetUnitState(gg_unit_H000_0001, UNIT_STATE_MANA, 690)
set gg_unit_h001_0002=CreateUnit(p, 'h001', - 728.7, 532.3, 315.000)
set u=CreateUnit(p, 'h002', - 861.7, 380.0, 270.000)
set u=CreateUnit(p, 'h002', - 718.2, 364.7, 270.000)
set u=CreateUnit(p, 'h002', - 611.2, 392.3, 315.000)
set u=CreateUnit(p, 'h002', - 548.9, 473.5, 0.000)
set u=CreateUnit(p, 'h002', - 547.4, 602.6, 0.000)
endfunction
Any help would be appreciated
Thanks,
Mr_Bean