Hello everybody!
First of all, I would like you to know that I've read this like a hundred times, and yes, I've tried to make it work myself. The problem is that it cannot load anything from the hashtable (all it prints is "0.000"). What am I doing wrong? Oh, and please don't tell me about leaks etc etc. All I need is some help on hashtables.
Here's the trigger:
Any help appreciated!
First of all, I would like you to know that I've read this like a hundred times, and yes, I've tried to make it work myself. The problem is that it cannot load anything from the hashtable (all it prints is "0.000"). What am I doing wrong? Oh, and please don't tell me about leaks etc etc. All I need is some help on hashtables.
Here's the trigger:
-
StalkInit
-
Events
-
Unit - A unit Begins channeling an ability
-
-
Conditions
-
(Ability being cast) Equal to Blink
-
-
Actions
-
Set StalkTotalDistance = (Distance between (Position of (Triggering unit)) and (Target point of ability being cast))
-
Game - Display to (All players) the text: (DEBUG: StalkTotalDistance: + (String(StalkTotalDistance)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
StalkTotalDistance Greater than 800.00
-
-
Then - Actions
-
Set StalkTotalDistance = 800.00
-
-
Else - Actions
-
-
Game - Display to (All players) the text: (DEBUG: StalkTotalDistance: + (String(StalkTotalDistance)))
-
Hashtable - Save Handle Of(Target point of ability being cast) as 0 of (Key (Triggering unit)) in Stalk
-
Game - Display to (All players) the text: (DEBUG: + (String((Load 0 of (Key (Triggering unit)) from Stalk))))
-
Hashtable - Save 800 as 1 of (Key (Triggering unit)) in Stalk
-
Hashtable - Save Handle Of(Triggering unit) as 2 of (Key (Triggering unit)) in Stalk
-
Unit Group - Add (Triggering unit) to StalkGroup
-
-