Hello, I've been having issues with creating a unit Multishot that hits only units infront of the shooter (like cone spells), and deal damage based on its own damage.
I did make 2 versions of this, and 1 of them is somewhat working, but it's still not perfect. I want the Multishot to cover 5 criterias:
1. Only units infront of the shooter shall be shot.
2. Stop spamming should be prevented
3. The damage dealt by the Multishot shall be based on the unit's damage.
4. It should stack with criticals.
5. All the missiles should be launched at once.
The 1-st multishot I made wasn't covering (2) and (3). And the 2-nd one doesn't cover (5) and only partly covers (3). The difference between the systems was that the 1-st was using "A unit is attacked" event, while I was using the GDD damage detection for the 2-nd.
This is how the trigger looks like:
So the problems here are:
1) I had to make missile speed of Death Archer = 100000 and remove its model, so it wouldn't look like: the archer shoots and when the shot reaches the target - a spray of arrows is launched from the shooter. Now I artificially create the missiles
2) When the main target has high armor - all of the units hit will take damage equal to the damage dealt to the 1-st, and they will reduce the damage further with their armor.
NOTE: if you are wondering what's this "(Integer((Distance between (Position of MultiUnit) and (Position of (Picked unit))))) Less than or equal to (Integer((110.00 + (Distance between (Position of MultiUnit) and MultiPt))))" doing - it's making the multishot hit targets in a parabula infront of the shooter, instead of a simple cone
I did make 2 versions of this, and 1 of them is somewhat working, but it's still not perfect. I want the Multishot to cover 5 criterias:
1. Only units infront of the shooter shall be shot.
2. Stop spamming should be prevented
3. The damage dealt by the Multishot shall be based on the unit's damage.
4. It should stack with criticals.
5. All the missiles should be launched at once.
The 1-st multishot I made wasn't covering (2) and (3). And the 2-nd one doesn't cover (5) and only partly covers (3). The difference between the systems was that the 1-st was using "A unit is attacked" event, while I was using the GDD damage detection for the 2-nd.
This is how the trigger looks like:
-
Multishot
-
Events
- Game - GDD_Event becomes Equal to 0.00
-
Conditions
- (Level of Multishot (Death Archer) for GDD_DamageSource) Greater than 0
-
Actions
- Set MultiUnit = GDD_DamageSource
- Set MultiTarget = GDD_DamagedUnit
- Set MultiGroup = (Units within 900.00 of (Position of MultiUnit))
- Set MultiUtPt = (Position of MultiUnit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of MultiTarget) is an ally of (Owner of MultiUnit)) Equal to True
-
Then - Actions
- Unit - Create 1 Dummy for Neutral Hostile at MultiUtPt facing Default building facing degrees
- Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
- Unit - Add Arrow to (Last created unit)
- Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb MultiTarget
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Critical Strike Special for MultiUnit) Greater than 0
- (Random integer number between 1 and 100) Less than or equal to 25
-
Then - Actions
- Set message = ((String((GDD_Damage x 2.50), 0, 0)) + !)
- Floating Text - Create floating text that reads message above MultiUnit with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
- Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the lifespan of (Last created floating text) to 1.90 seconds
- Floating Text - Change the fading age of (Last created floating text) to 0.80 seconds
-
Unit Group - Pick every unit in MultiGroup and do (Actions)
-
Loop - Actions
- Set MultiPoint = ((Position of MultiUnit) offset by (Distance between (Position of MultiUnit) and (Position of (Picked unit))) towards ((Angle from (Position of MultiUnit) to (Position of (Picked unit))) - (Angle from (Position of MultiUnit) to (Position of MultiTarget))) deg
- Set MultiPt = (Point((X of MultiPoint), (Y of (Position of MultiUnit))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Picked unit)) is an enemy of (Owner of MultiUnit)) Equal to True
- (Angle from (Position of MultiUnit) to MultiPoint) Greater than or equal to -45.00
- (Angle from (Position of MultiUnit) to MultiPoint) Less than or equal to 45.00
- (Integer((Distance between (Position of MultiUnit) and (Position of (Picked unit))))) Less than or equal to (Integer((110.00 + (Distance between (Position of MultiUnit) and MultiPt))))
- (Angle from (Position of MultiUnit) to MultiPt) Less than 90.00
-
Then - Actions
- Unit - Create 1 Dummy for (Owner of MultiUnit) at MultiUtPt facing 0.00 degrees
- Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
- Set Dummy = (Last created unit)
- Unit - Add Arrow to Dummy
- Unit - Order Dummy to Neutral Alchemist - Acid Bomb (Picked unit)
- If ((Picked unit) Equal to MultiTarget) then do (Unit - Cause Dummy to damage (Picked unit), dealing (GDD_Damage x 1.50) damage of attack type Chaos and damage type Normal) else do (Unit - Cause Dummy to damage (Picked unit), dealing (GDD_Damage x 2.50) damage of attack type Chaos and damage type Normal)
- Set Dummy = No unit
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation (udg_MultiPoint)
- Custom script: call RemoveLocation (udg_MultiPt)
-
Loop - Actions
-
Else - Actions
-
Unit Group - Pick every unit in MultiGroup and do (Actions)
-
Loop - Actions
- Set MultiPoint = ((Position of MultiUnit) offset by (Distance between (Position of MultiUnit) and (Position of (Picked unit))) towards ((Angle from (Position of MultiUnit) to (Position of (Picked unit))) - (Angle from (Position of MultiUnit) to (Position of MultiTarget))) deg
- Set MultiPoint = (Point((X of MultiPoint), (Y of (Position of MultiUnit))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Owner of (Picked unit)) is an enemy of (Owner of MultiUnit)) Equal to True
- (Angle from (Position of MultiUnit) to MultiPoint) Greater than or equal to -45.00
- (Angle from (Position of MultiUnit) to MultiPoint) Less than or equal to 45.00
- (Integer((Distance between (Position of MultiUnit) and (Position of (Picked unit))))) Less than or equal to (Integer((110.00 + (Distance between (Position of MultiUnit) and MultiPoint))))
- (Angle from (Position of MultiUnit) to MultiPoint) Less than 90.00
-
Then - Actions
- Unit - Create 1 Dummy for (Owner of MultiUnit) at MultiUtPt facing 0.00 degrees
- Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
- Set Dummy = (Last created unit)
- Unit - Add Arrow to Dummy
- Unit - Order Dummy to Neutral Alchemist - Acid Bomb (Picked unit)
- If ((Picked unit) Equal to MultiTarget) then do (Do nothing) else do (Unit - Cause Dummy to damage (Picked unit), dealing GDD_Damage damage of attack type Chaos and damage type Normal)
- Set Dummy = No unit
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation (udg_MultiPoint)
- Custom script: call RemoveLocation (udg_MultiPt)
-
Loop - Actions
-
Unit Group - Pick every unit in MultiGroup and do (Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Unit Group - Remove all units from MultiGroup
- Custom script: call DestroyGroup (udg_MultiGroup)
- Custom script: call RemoveLocation (udg_MultiUtPt)
-
Events
So the problems here are:
1) I had to make missile speed of Death Archer = 100000 and remove its model, so it wouldn't look like: the archer shoots and when the shot reaches the target - a spray of arrows is launched from the shooter. Now I artificially create the missiles
2) When the main target has high armor - all of the units hit will take damage equal to the damage dealt to the 1-st, and they will reduce the damage further with their armor.
NOTE: if you are wondering what's this "(Integer((Distance between (Position of MultiUnit) and (Position of (Picked unit))))) Less than or equal to (Integer((110.00 + (Distance between (Position of MultiUnit) and MultiPt))))" doing - it's making the multishot hit targets in a parabula infront of the shooter, instead of a simple cone
Last edited: