- Joined
- Jul 20, 2009
- Messages
- 295
I got a query about how to load hashtable values of a casting unit from a dummy unit.
Idea:
Once a unit begins channeling, save name of ability being cast, save caster and target, Create a dummy which dies after 3 seconds.
After dummy dies, If ability name is Cure then Heal target by 12xIntelligence of Caster.
If there is a shortcut to this, please let me know.
Idea:
Once a unit begins channeling, save name of ability being cast, save caster and target, Create a dummy which dies after 3 seconds.
After dummy dies, If ability name is Cure then Heal target by 12xIntelligence of Caster.
-
Start Casting
-
Events
- Unit - A unit Begins channeling an ability
-
Conditions
- (Ability being cast) Not equal to Status
-
Actions
- Set hashunit = (Triggering unit)
- Custom script: set udg_handle = udg_hashunit
- Hashtable - Save (Name of (Ability being cast)) as 0 of (Key handle) in Hashtable
- Hashtable - Save Handle Of(Triggering unit) as 0 of (Key handle) in Hashtable
- Hashtable - Save Handle Of(Target unit of ability being cast) as 1 of (Key handle) in Hashtable
- Unit - Create 1 Wisp [Casting] for (Owner of (Triggering unit)) at TempLocation2 facing Default building facing degrees
- Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
- Custom script: call RemoveLocation(udg_TempLocation)
- Custom script: call RemoveLocation(udg_TempLocation2)
-
Events
-
Spell Effect
-
Events
- Unit - A unit Dies
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Wisp [Casting]
-
Actions
- -------- Check if Ability is Cure --------
- -------- Then --------
- Unit - Set life of Target to ((Life of Target) + (12.00 x (Real((Intelligence of Caster (Include bonuses))))))
- -------- Else --------
- -------- (Do nothing) --------
-
Events