I completed Stalk, cleaned all the leaks (or the ones I could see anyway), made it MUI, made it work perfectly BUT THE BLOODY COOLDOWN SCREWES EVERYTHING UP! I did search for old threads dealing with that problem, and from what I understood is that you have to pause a unit when you move it, to prevent the cooldown from resetting. I have included the map (and the triggers, if somebody is too lazy). I have other means of balancing it (up the mana cost or adding a really nasty debuff if used twice in a row, to name a few), but I do not want that. I don't even know if I'm allowed to ask for this kind of help, so please tell me if I'm not. Here are the triggers. I would appreciate it if somebody told me where the pauses/unpauses should be, because I tried a lot and did nothing.
-
StalkInit
-
Events
- Unit - A unit Begins casting an ability
-
Conditions
- (Ability being cast) Equal to Stalk
-
Actions
- Set StalkTemp1 = (Position of (Triggering unit))
- Set StalkTemp2 = (Target point of ability being cast)
- Set StalkTotalDistance = (Distance between StalkTemp1 and StalkTemp2)
- Unit - Make (Triggering unit) face StalkTemp2 over 0.00 seconds
- Set StalkFacing = (Angle from (Position of (Triggering unit)) to StalkTemp2)
- Sound - Play FlashBack1Second <gen> at 100.00% volume, attached to (Triggering unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- StalkTotalDistance Greater than (450.00 + ((Real((Level of Stalk for (Triggering unit)))) x 150.00))
-
Then - Actions
- Set StalkTotalDistance = (450.00 + ((Real((Level of Stalk for (Triggering unit)))) x 150.00))
- Else - Actions
-
If - Conditions
- Hashtable - Save StalkTotalDistance as 0 of (Key (Triggering unit)) in Stalk
- Hashtable - Save Handle Of(Triggering unit) as 1 of (Key (Triggering unit)) in Stalk
- Hashtable - Save Handle OfStalkTemp1 as 2 of (Key (Triggering unit)) in Stalk
- Hashtable - Save StalkFacing as 3 of (Key (Triggering unit)) in Stalk
- Unit Group - Add (Triggering unit) to StalkGroup
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (StalkLoop <gen> is on) Equal to False
-
Then - Actions
- Trigger - Turn on StalkLoop <gen>
- Else - Actions
-
If - Conditions
-
Events
-
StalkLoop
-
Events
- Time - Every 0.04 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in StalkGroup and do (Actions)
-
Loop - Actions
- Set StalkTotalDistance = (Load 0 of (Key (Picked unit)) from Stalk)
- Set StalkCaster = (Load 1 of (Key (Picked unit)) in Stalk)
- Set StalkLocTemp = (Load 2 of (Key (Picked unit)) in Stalk)
- Set StalkFacing = (Load 3 of (Key (Picked unit)) from Stalk)
- Set StalkLoc = (StalkLocTemp offset by 50.00 towards StalkFacing degrees)
- Hashtable - Save Handle OfStalkLoc as 2 of (Key (Picked unit)) in Stalk
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- StalkTotalDistance Greater than 0.00
-
Then - Actions
- Unit - Move StalkCaster instantly to StalkLoc
- Unit - Turn collision for StalkCaster Off
- Animation - Change StalkCaster's animation speed to 50.00% of its original speed
- Animation - Change StalkCaster's vertex coloring to (0.00%, 0.00%, 0.00%) with 0.00% transparency
- Unit - Create 1 Stalk smoke for (Owner of StalkCaster) at StalkLoc facing Default building facing degrees
- Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
- Set StalkTotalDistance = (StalkTotalDistance - 50.00)
- Hashtable - Save StalkTotalDistance as 0 of (Key (Picked unit)) in Stalk
-
Else - Actions
- Unit - Turn collision for StalkCaster On
- Animation - Change StalkCaster's animation speed to 100.00% of its original speed
- Animation - Change StalkCaster's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
- Unit Group - Remove StalkCaster from StalkGroup
- Unit - Add Stalk Damage to StalkCaster
- Unit - Set level of Stalk Damage for StalkCaster to (Level of Stalk for StalkCaster)
- Unit - Order StalkCaster to Orc Blademaster - Wind Walk
- Unit - Remove Stalk Damage from StalkCaster
- Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Stalk
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (StalkGroup is empty) Equal to True
-
Then - Actions
- Trigger - Turn off (This trigger)
- Custom script: call RemoveLocation(udg_StalkTemp1)
- Custom script: call RemoveLocation(udg_StalkTemp2)
- Custom script: call RemoveLocation(udg_StalkLoc)
- Custom script: call RemoveLocation(udg_StalkLocTemp)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in StalkGroup and do (Actions)
-
Events