Zealot
Member
- Reaction score
- 11
I'm trying to create a spell that is multi-player instanceable.
Yet the spell works properly ONLY for player 1.
For the other players it only spawns the dummy unit but the dummy unit does not travel to the location via the second trigger.
I believe I used something incorrectly, any suggestions would be appreciated, I'm new with hashtables. I believe I've used timers wrongly, but I'm not sure.
Yet the spell works properly ONLY for player 1.
For the other players it only spawns the dummy unit but the dummy unit does not travel to the location via the second trigger.
I believe I used something incorrectly, any suggestions would be appreciated, I'm new with hashtables. I believe I've used timers wrongly, but I'm not sure.
Trigger:
- Fishing Net
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Dispel Magic
- Actions
- For each (Integer A) from 1 to 4, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Owner of (Casting unit)) Equal to (Player((Integer A)))
- Then - Actions
- Set Fishing_Caster_Point = (Position of (Casting unit))
- Set Fishing_Target_Point = (Target point of ability being cast)
- Unit - Create 1 Net for (Owner of (Casting unit)) at Fishing_Caster_Point facing Default building facing degrees
- Hashtable - Save Handle Of(Last created unit) as (Integer A) of 1 in Fishing_Hash
- Hashtable - Save Handle OfFish_Timer as (Integer A) of 3 in Fishing_Hash
- Hashtable - Save Handle OfFishing_Target_Point as (Integer A) of 4 in Fishing_Hash
- Hashtable - Save Handle OfFishing_Caster_Point as (Integer A) of 2 in Fishing_Hash
- Countdown Timer - Start (Load (Integer A) of 3 in Fishing_Hash) as a One-shot timer that will expire in 0.01 seconds
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer A) from 1 to 4, do (Actions)
- Events
Trigger:
- Fishing Net Travel
- Events
- Time - Fish_Timer expires
- Conditions
- Actions
- For each (Integer A) from 1 to 4, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Remaining time for (Load (Integer A) of 3 in Fishing_Hash)) Equal to 0.00
- Then - Actions
- Set Fishing_Net_Point = (Position of (Load (Integer A) of 1 in Fishing_Hash))
- Set Fishing_Target_Point = (Load (Integer A) of 4 in Fishing_Hash)
- Set Fishing_Caster_Point = (Load (Integer A) of 2 in Fishing_Hash)
- Animation - Change (Load (Integer A) of 1 in Fishing_Hash) flying height to ((Default flying height of (Load (Integer A) of 1 in Fishing_Hash)) - (((Distance between Fishing_Caster_Point and Fishing_Net_Point) / (Distance between Fishing_Target_Point and Fishing_Caster_Point)) x 100.00)) at 0.00
- Unit - Move (Load (Integer A) of 1 in Fishing_Hash) instantly to (Fishing_Net_Point offset by 6.00 towards (Angle from Fishing_Net_Point to Fishing_Target_Point) degrees)
- Hashtable - Save Handle OfFish_Timer as (Integer A) of 3 in Fishing_Hash
- Countdown Timer - Start (Load (Integer A) of 3 in Fishing_Hash) as a One-shot timer that will expire in 0.01 seconds
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer A) from 1 to 4, do (Actions)
- Events