S
sinners1234
Guest
Hi all,
I am new to Jass so this question prob seems really stupid, however i did a search and couldnt find and answer to it.
In my code i create a unit, then i want to put this Last created unit into a variable.
function Trig_Ability_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction
function Trig_Ability_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local location l = GetUnitLoc(c)
call CreateUnitAtLoc(Player(0), 'n000', l, 0.00)
call SetUnitFlyHeightBJ(GetLastCreatedUnit(), 500.00,100.00)
endfunction
Sorry bout ^^^^^^^ Didnt know how to insert that codde box thingy
As you can see i create 'n000' (which is a dummie) at the casters location. Next the dummie is ment to rise up to 500 flying height, however he does not do that, and i am assuming that is because i have used the LastCreatedUnit(). Is there any way to get my dummie ('n000') into a variable.
Thanks
I am new to Jass so this question prob seems really stupid, however i did a search and couldnt find and answer to it.
In my code i create a unit, then i want to put this Last created unit into a variable.
function Trig_Ability_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction
function Trig_Ability_Actions takes nothing returns nothing
local unit c = GetTriggerUnit()
local location l = GetUnitLoc(c)
call CreateUnitAtLoc(Player(0), 'n000', l, 0.00)
call SetUnitFlyHeightBJ(GetLastCreatedUnit(), 500.00,100.00)
endfunction
Sorry bout ^^^^^^^ Didnt know how to insert that codde box thingy
As you can see i create 'n000' (which is a dummie) at the casters location. Next the dummie is ment to rise up to 500 flying height, however he does not do that, and i am assuming that is because i have used the LastCreatedUnit(). Is there any way to get my dummie ('n000') into a variable.
Thanks