- Joined
- Apr 8, 2008
- Messages
- 88
Here's the trigger. I've noticed that when several unit's are using this "spell", it get mixed and well. It turns out bad.
Isn't this trigger compatible for multiple usage? How to make it so it is?
+Rep for help that solves my problem
Isn't this trigger compatible for multiple usage? How to make it so it is?
+Rep for help that solves my problem
-
Fishing
-
Events
- Time - Every 0.07 seconds of game time
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Fishing Greater than 0
-
Then - Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
- Set Curent_Integer_Value = (Integer A)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Is_Fishing[Curent_Integer_Value] Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- How_Many_Runs[Curent_Integer_Value] Less than 19
-
Then - Actions
- Set Curent_Position[Curent_Integer_Value] = (Position of Fish[Curent_Integer_Value])
- Set Move_Fish_Here[Curent_Integer_Value] = (Curent_Position[Curent_Integer_Value] offset by ((Real(Total_Range_Fishing[Curent_Integer_Value])) / 20.00) towards (Real(Degrees_Between_Fish_N_Fisher[Curent_Integer_Value])) degrees)
- Unit - Move Fish[Curent_Integer_Value] instantly to Move_Fish_Here[Curent_Integer_Value]
- Set How_Many_Runs[Curent_Integer_Value] = (How_Many_Runs[Curent_Integer_Value] + 1)
- -------- Fixing Memory Leaks --------
- Custom script: call RemoveLocation(udg_Curent_Position[udg_Curent_Integer_Value])
- Custom script: call RemoveLocation(udg_Move_Fish_Here[udg_Curent_Integer_Value])
-
Else - Actions
- -------- When the fish is close to the caster, he gets an item and the fish get's removed --------
- Set Curent_Position[Curent_Integer_Value] = (Position of Fish[Curent_Integer_Value])
- Item - Create Fish at Curent_Position[Curent_Integer_Value]
- Unit Group - Pick every unit in (Units within 50.00 of Curent_Position[Curent_Integer_Value]) and do (Hero - Give (Last created item) to (Picked unit))
- Unit - Remove Fish[Curent_Integer_Value] from the game
- Set Is_Fishing[Curent_Integer_Value] = False
- Set Fishing = (Fishing - 1)
- Set How_Many_Runs[Curent_Integer_Value] = 0
- -------- Fixing Memory Leaks --------
- Custom script: call RemoveLocation(udg_Curent_Position[udg_Curent_Integer_Value])
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
For each (Integer A) from 1 to 12, do (Actions)
-
Else - Actions
- Trigger - Turn off (This trigger)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events