handle vars
here is how we would do it ( assuming you have the Handle Vars in the maps custom script secion, they can be DLed
Here )
anyways, here is how the trigger would work
***uses a global unit U***
Trigger 1 - the Init
Events
(your event)
Conditions
(your conditions)
Actions
Custom Script: local timer t = CreateTimer()
Custom Script: call SetHandleHandle( t, "bob", joe )
//note - for that last thing ( the SetHandleHandle ), replace "bob" with "yourstring", yourstring being the name of where you are storing it being. replace joe with your unit ( if it is A Unit Starts the Effect Of An Ability, for example, it would be GetSpellTargetUnit() for the targeted unit and GetTriggerUnit() for the casting unit. )
//here, do any other handler sets, so for example, i could do
Custom Script: call SetHandleReal( t, "bob", joe )
//with joe being the real and "bob" being the storage name
//next, do all your stuff here
next,
Custom Script: call TimerStart( t, a, true, function Trigger_Trigger2_Actions )
//a should be the time between timer calls ( most spells use 0.01 ). note - for the part that function Trigger_Trigger2_Actions, replace Trigger2 with the name of your 2nd trigger for this. also, Trigger2 must be ABOVE Trigger1 in the list of triggers.
Trigger 2
Events
(none)
Conditions
(none)
Actions
Custom Script: local timer t = GetExpiredTimer()
//next, assuming you want to get the unit and store it in variable U
Custom Script: set udg_U = GetHandleUnit( t, "yourcategory" )
//making sure "yourcategory" is the same place in which you stored it.
//here, do everything else.