- Joined
- Oct 25, 2009
- Messages
- 995
I am making a skill for my friends,it work,but it doesn't damage enemy,anyone can tell me why?This skill same with DotA Windrunner Powershot, and is it MUI!?When 2 people cast the skill at same time,the missle very strange,sometimes go to another way.
here's the trigger:
+REP for helpers
here's the trigger:
-
BS Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Battle Shot
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- BS_IndexSize Equal to 0
-
Then - Actions
- Trigger - Turn on BS Loop <gen>
- Else - Actions
-
If - Conditions
- Set BS_IndexSize = (BS_IndexSize + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- BS_IndexSize Greater than BS_IndexMaxSize
-
Then - Actions
- Set BS_Index[BS_IndexSize] = BS_IndexSize
- Set BS_IndexMaxSize = BS_IndexSize
- Else - Actions
-
If - Conditions
- Set BS_ZInteger = BS_Index[BS_IndexSize]
- Set BS_Caster[BS_ZInteger] = (Triggering unit)
- Set BS_Boolean[BS_ZInteger] = False
- Set BS_Range[BS_ZInteger] = 1700.00
- Set BS_ReduceInteger[BS_ZInteger] = 0
- Set BS_Speed[BS_ZInteger] = 0.00
- Set BS_Damage[BS_ZInteger] = (40.00 + (80.00 x (Real((Level of Battle Shot for BS_Caster[BS_ZInteger])))))
- Set BS_ReduceDamage[BS_ZInteger] = (BS_Damage[BS_ZInteger] / (10.00 / 100.00))
- Set BS_RealReduceDamage[BS_ZInteger] = 0.00
- Set BS_Points[1] = (Position of BS_Caster[BS_ZInteger])
- Set BS_Points[2] = (BS_Points[1] offset by 50.00 towards (Facing of BS_Caster[BS_ZInteger]) degrees)
- Unit - Create 1 BS_Dummy for (Triggering player) at BS_Points[2] facing (Facing of BS_Caster[BS_ZInteger]) degrees
- Set BS_Dummy[BS_ZInteger] = (Last created unit)
- Set BS_Points[3] = (Position of BS_Dummy[BS_ZInteger])
- Unit - Turn collision for BS_Dummy[BS_ZInteger] Off
- Set BS_Group[BS_ZInteger] = (Units within 100.00 of BS_Points[3] matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner
-
Unit Group - Pick every unit in BS_Group[BS_ZInteger] and do (Actions)
-
Loop - Actions
- Set BS_PickedUnit[BS_ZInteger] = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (BS_PickedUnit[BS_ZInteger] is in BS_PickGroup[BS_ZInteger]) Equal to False
-
Then - Actions
- Set BS_ReduceInteger[BS_ZInteger] = (BS_ReduceInteger[BS_ZInteger] + 1)
- Set BS_RealReduceDamage[BS_ZInteger] = ((Real(BS_ReduceInteger[BS_ZInteger])) x BS_ReduceDamage[BS_ZInteger])
- Unit - Cause BS_Dummy[BS_ZInteger] to damage BS_PickedUnit[BS_ZInteger], dealing (BS_Damage[BS_ZInteger] - BS_RealReduceDamage[BS_ZInteger]) damage of attack type Spells and damage type Normal
- Unit Group - Add BS_PickedUnit[BS_ZInteger] to BS_PickGroup[BS_ZInteger]
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Custom script: call DestroyGroup(udg_BS_Group[udg_BS_ZInteger])
- Custom script: if udg_BS_PickGroup[udg_BS_ZInteger] == null then
- Custom script: set udg_BS_PickGroup[udg_BS_ZInteger] = CreateGroup()
- Custom script: endif
- Custom script: call RemoveLocation(udg_BS_Points[2])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
BS Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer BS_IndexLoop) from 1 to BS_IndexSize, do (Actions)
-
Loop - Actions
- Set BS_ZInteger = BS_Index[BS_IndexLoop]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- BS_Range[BS_ZInteger] Greater than BS_Speed[BS_ZInteger]
-
Then - Actions
- Set BS_Speed[BS_ZInteger] = (BS_Speed[BS_ZInteger] + 50.00)
- Set BS_Points[4] = (BS_Points[1] offset by BS_Speed[BS_ZInteger] towards (Facing of BS_Dummy[BS_ZInteger]) degrees)
- Set BS_Points[5] = (Position of BS_Dummy[BS_ZInteger])
- Unit - Move BS_Dummy[BS_ZInteger] instantly to BS_Points[4]
- Set BS_Group[BS_ZInteger] = (Units within 100.00 of BS_Points[5] matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is Magic Immune) Not equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner
-
Unit Group - Pick every unit in BS_Group[BS_ZInteger] and do (Actions)
-
Loop - Actions
- Set BS_PickedUnit[BS_ZInteger] = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (BS_PickedUnit[BS_ZInteger] is in BS_PickGroup[BS_ZInteger]) Equal to False
-
Then - Actions
- Set BS_ReduceInteger[BS_ZInteger] = (BS_ReduceInteger[BS_ZInteger] + 1)
- Set BS_RealReduceDamage[BS_ZInteger] = ((Real(BS_ReduceInteger[BS_ZInteger])) x BS_ReduceDamage[BS_ZInteger])
- Unit - Cause BS_Dummy[BS_ZInteger] to damage BS_PickedUnit[BS_ZInteger], dealing (BS_Damage[BS_ZInteger] - BS_RealReduceDamage[BS_ZInteger]) damage of attack type Spells and damage type Normal
- Unit Group - Add BS_PickedUnit[BS_ZInteger] to BS_PickGroup[BS_ZInteger]
- Else - Actions
-
If - Conditions
-
Loop - Actions
- Custom script: call DestroyGroup(udg_BS_Group[udg_BS_ZInteger])
- Custom script: call RemoveLocation(udg_BS_Points[3])
- Custom script: call RemoveLocation(udg_BS_Points[4])
- Custom script: call RemoveLocation(udg_BS_Points[5])
-
Else - Actions
- Unit - Explode BS_Dummy[BS_ZInteger]
- Set BS_Boolean[BS_ZInteger] = True
- Custom script: call RemoveLocation(udg_BS_Points[1])
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- BS_Boolean[BS_ZInteger] Equal to True
-
Then - Actions
- Set BS_Index[BS_IndexLoop] = BS_Index[BS_IndexSize]
- Set BS_Index[BS_IndexSize] = BS_ZInteger
- Set BS_IndexLoop = (BS_IndexLoop - 1)
- Set BS_IndexSize = (BS_IndexSize - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- BS_IndexSize Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
For each (Integer BS_IndexLoop) from 1 to BS_IndexSize, do (Actions)
-
Events