I understand most of it, so I thought I would try something different.. save the unt instead of the location.. And I can't seem to get it to work, and Aero told me to Terrian and not worry about it, aka, figure it out urself on ur own time.. bastard.. -.-
Basically, when you cast meteor storm, it causes infernal births to randomly spawn around you and deal dmg. Aero at least told me what function to use to convert unit to integer to be stored in a game cache..
I cannot figure out why this doesn't work... I'm using these 2 custom functions:
Code: Select all
function H2I takes handle h returns integer
return h
return 0
endfunction
function ReturnUnit takes string title, string tag returns unit
return GetStoredInteger(udg_gc,title,tag)
return null
endfunction
Code: Select all
function metcond takes nothing returns boolean
return GetSpellAbilityId()=='A05C'
endfunction
function mettimer takes nothing returns nothing
local timer t=GetExpiredTimer()
local string s=(I2S(H2I(t)))
local unit u=ReturnUnit(s,"u")
local location l=GetUnitLoc(u)
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local rect r=Rect(-640,384,256,448)
call RemoveLocation(l)
call MoveRectTo(r,x,y)
call DestroyEffect(AddSpecialEffectLocBJ(GetRandomLocInRect(r),"Units\\Demon\\Infernal\\InfernalBirth.mdl"))
call DestroyTimer(t)
call RemoveRect(r)
set l=null
set r=null
set t=null
set u=null
endfunction
function metact takes nothing returns nothing
local unit u=GetTriggerUnit()
local timer t=CreateTimer()
local string s=(I2S(H2I(t)))
local region r
call StoreInteger(udg_gc,s,"playerid",GetPlayerId(GetTriggerPlayer()))
call StoreInteger(udg_gc,s,"u",H2I(u))
call TimerStart(t,.05,true,function mettimer)
call PolledWait(2.50)
call DestroyTimer(t)
call FlushStoredMission(udg_gc,s)
set u=null
set s=""
set t=null
endfunction
function InitTrig_meteorstorm takes nothing returns nothing
set gg_trg_meteorstorm = CreateTrigger()
call TriggerAddCondition(gg_trg_meteorstorm, Condition(function metcond))
call TriggerAddAction(gg_trg_meteorstorm, function metact)
endfunction
K, so, Xantan, don't gimme the run-down on how easy it can be done.. I'm doing this the hard way to learn.. -.-
Spoofzz