- Joined
- Oct 11, 2012
- Messages
- 711
How to set a unit variable to a specific unit ID?
For example:
if I create a unit "n000" at a certain location and I want to later refer to that unit, I need to set "n000" to "gg_unit_n000_0001",how to do that? I tried the following but failed:
When I later use "gg_unit_n000_0001", which is a global variable, in a trigger, the trigger does not respond....
I want to use "gg_unit_n000_0001" instead of the unit ID "n000", because some function requires unit and not integer....
For example:
if I create a unit "n000" at a certain location and I want to later refer to that unit, I need to set "n000" to "gg_unit_n000_0001",how to do that? I tried the following but failed:
JASS:
call CreateUnitAtLoc(Player(11),'n000',udg_GO[1],bj_UNIT_FACING)
set gg_unit_n000_0001 = bj_lastCreatedUnit
When I later use "gg_unit_n000_0001", which is a global variable, in a trigger, the trigger does not respond....
I want to use "gg_unit_n000_0001" instead of the unit ID "n000", because some function requires unit and not integer....
Last edited: