Simple question i wanna use Equipment v2.5.2
i already got installed into my map, i know how to add and remove items from it.
But the heros is a different story, i know how to add them but only if there on map instantly
i have this, And Basically wanna add this: call CreateEquipment(Hero1)
now if i use that code on trigger that creates unit instantly on starting, it works perfectly, but i want it to add to a hero that was selected by player.
but it doesnt work without creating unit instantly, but dont want unit instantly created, if i add the ability ingame to hero without this command, it adsd it but doesnt work, so has to be added via call CreateEquipment(Hero1) however it dont work unless its like this
local unit Hero1 = CreateUnit(Player(4), 'N003', 18601, 30072, 0)
call CreateEquipment(Hero1)
so basically how to i get call CreateEquipment(Hero1) to add to hero after hero is selected by player
i already got installed into my map, i know how to add and remove items from it.
But the heros is a different story, i know how to add them but only if there on map instantly
i have this, And Basically wanna add this: call CreateEquipment(Hero1)
now if i use that code on trigger that creates unit instantly on starting, it works perfectly, but i want it to add to a hero that was selected by player.
but it doesnt work without creating unit instantly, but dont want unit instantly created, if i add the ability ingame to hero without this command, it adsd it but doesnt work, so has to be added via call CreateEquipment(Hero1) however it dont work unless its like this
local unit Hero1 = CreateUnit(Player(4), 'N003', 18601, 30072, 0)
call CreateEquipment(Hero1)
so basically how to i get call CreateEquipment(Hero1) to add to hero after hero is selected by player
Code:
function Trig_SelectOrc_Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'hpea' ) ) then
return false
endif
return true
endfunction
function Trig_SelectOrc_Actions takes nothing returns nothing
if ( Trig_SelectOrc_Func001C() ) then
call CreateNUnitsAtLoc( 1, 'N000', GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_SetHero), bj_UNIT_FACING )
call TriggerSleepAction( 0.01 )
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_SetHero), 2.00 )
call KillUnit( GetEnteringUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_SelectOrc takes nothing returns nothing
set gg_trg_SelectOrc = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_SelectOrc, gg_rct_OrcSelect )
call TriggerAddAction( gg_trg_SelectOrc, function Trig_SelectOrc_Actions )
endfunction
Last edited: