- Joined
- Aug 19, 2007
- Messages
- 109
I'm workng on another ability for my castle map(again) and this ability seems to work in odd ways... heres what it's meant to do:
1:Create dummy unit at position of the hero(WM=unit variable which stays the same throughout entire game)
2:give dummy unit an ability based on carrion swarm and order dummy to cast it on a point using an angle designated in the 2nd trigger.(angle is set to 0 by default)
3:Loop the action 7 times, each with 1 sec. intervals.
Note:the point variables are ONLY used in this trigger, so they wont change within the trigg.(cept if the unit moves).
Problems:When i cast the ability(Dmmy based on Taunt) sometimes i get 5 shots, sometimes 2 if i change the angle to something other than 0. And also sometimes none, or just 1 shot.
Eveything works fine cept the irregular number of shots fired lol.
Plz tell me:
1:Whats wrong
2:If theres a better way to make the "Set angle" trigger instead of looping 360 times lol.
Plz help i need urgent
1:Create dummy unit at position of the hero(WM=unit variable which stays the same throughout entire game)
2:give dummy unit an ability based on carrion swarm and order dummy to cast it on a point using an angle designated in the 2nd trigger.(angle is set to 0 by default)
3:Loop the action 7 times, each with 1 sec. intervals.
Note:the point variables are ONLY used in this trigger, so they wont change within the trigg.(cept if the unit moves).
-
Strafe Guns
-
Events
- Unit - A unit Is issued an order with no target
-
Conditions
- (Ordered unit) Equal to WM
- (Issued order) Equal to (Order(taunt))
-
Actions
-
For each (Integer A) from 1 to 7, do (Actions)
-
Loop - Actions
- Set Special_Point_WM1 = (Position of (Ordered unit))
- Set Special_Point_WM2 = (Special_Point_WM1 offset by 500.00 towards Special_Real_WM degrees)
- Unit - Create 1 Dummy for (Owner of WM) at Special_Point_WM1 facing Special_Real_WM degrees
- Unit - Add DMG for Strafe Guns to (Last created unit)
- Unit - Set level of DMG for Strafe Guns for (Last created unit) to (Level of Strafe Guns (Dummy Taunt) for WM)
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm Special_Point_WM2
- Custom script: call RemoveLocation (udg_Special_Point_WM1)
- Custom script: call RemoveLocation (udg_Special_Point_WM2)
- Wait 1.00 game-time seconds
-
Loop - Actions
-
For each (Integer A) from 1 to 7, do (Actions)
-
Events
-
Set Angle Strafe Guns
-
Events
- Player - Player 1 (Red) types a chat message containing - as A substring
- Player - Player 2 (Blue) types a chat message containing - as A substring
- Player - Player 3 (Teal) types a chat message containing - as A substring
- Player - Player 4 (Purple) types a chat message containing - as A substring
- Player - Player 5 (Yellow) types a chat message containing - as A substring
- Player - Player 6 (Orange) types a chat message containing - as A substring
-
Conditions
- (Triggering player) Equal to (Owner of WM)
-
Actions
-
For each (Integer A) from 1 to 360, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Entered chat string) Equal to (- + (String((Integer A))))
-
Then - Actions
- Set Special_Real_WM = (Real((Integer((Substring((Entered chat string), 2, 4))))))
- Game - Display to (Player group((Owner of WM))) for 5.00 seconds the text: (Strafe Angle set to: + ((String(Special_Real_WM)) + Degrees.))
-
Else - Actions
- Do nothing
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to 360, do (Actions)
-
Events
Problems:When i cast the ability(Dmmy based on Taunt) sometimes i get 5 shots, sometimes 2 if i change the angle to something other than 0. And also sometimes none, or just 1 shot.
Eveything works fine cept the irregular number of shots fired lol.
Plz tell me:
1:Whats wrong
2:If theres a better way to make the "Set angle" trigger instead of looping 360 times lol.
Plz help i need urgent