K
KaiN2007
Guest
Can any1 make me a trigger for a item than when u die, respawns you at start like "Aegis of the Immortal" at dota?
this is aegis script:
thanks.
this is aegis script:
Code:
// OpenDota 6.41
// inspired by everyone who posted on forum threads and feedback page
// Objects used:
// 'olig' = Aegis of the Immortal
// 'H00I' = Geomancer
// DEBUG Trigger Number : 203
function Trig_Aegis_Conditions takes nothing returns boolean
if(GetItemTypeId(GetManipulatedItem())!='olig')then
return false
endif
return true
endfunction
function kgkg takes unit pgF returns nothing
local location lHS
if(PlayerIsScourge(GetOwningPlayer(pgF)))then
set lHS=GetRectCenter(gg_rct_ScourgeHeroSpawn)
else
set lHS=GetRectCenter(gg_rct_SentinelHeroSpawn)
endif
call HsHs(pgF,lHS)
call RemoveLocation(lHS)
endfunction
function kGkG takes unit pEU returns nothing
if GetUnitTypeId(pEU)=='H00I'then
call kgkg(pEU)
endif
endfunction
function Trig_Aegis_Actions takes nothing returns nothing
local unit lfo=GetTriggerUnit()
local location lfd
if(PlayerIsSentinel(GetOwningPlayer(lfo)))then
set lfd=GetRectCenter(gg_rct_SentinelHeroSpawn)
else
set lfd=GetRectCenter(gg_rct_ScourgeHeroSpawn)
endif
call PolledWait(3.)
call PanCameraToTimedLocForPlayer(GetOwningPlayer(lfo),lfd,1.)
call SetUnitPositionLoc(lfo,lfd)
call kGkG(GetTriggerUnit())
call RemoveLocation(lfd)
if udg_A5 then
call PauseUnit(lfo,true)
call PolledWait(6)
call PauseUnit(lfo,true)
endif
call gDgD(lfo)
endfunction
function StartTrigger_Aegis takes nothing returns nothing
set gg_trg_Aegis=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Aegis,EVENT_PLAYER_UNIT_USE_ITEM)
call TriggerAddCondition(gg_trg_Aegis,Condition(function Trig_Aegis_Conditions))
call TriggerAddAction(gg_trg_Aegis,function Trig_Aegis_Actions)
endfunction
function InitTrig_Aegis takes nothing returns nothing
endfunction