- Joined
- Mar 1, 2012
- Messages
- 1
Hello--a little help if you will?
I basically have a trigger that damages enemies based on a dummy unit collision that acts as a missile. It seems to work thoroughly as expected for the first time; there are three missiles that center inward from triangular points, so there is a chance to do triple damage if targeted correctly, none at all if missed, or just normal damage if only one missile hits. The spell in its entirety works for the 1st run through. However, every repeated use afterwards seems to just kill units instantly (I'm imagining that some condition check is not working, particularly with a Unit Group check), and I cannot seem to pin down how to fix the issue.
Help is greatly appreciated!
I basically have a trigger that damages enemies based on a dummy unit collision that acts as a missile. It seems to work thoroughly as expected for the first time; there are three missiles that center inward from triangular points, so there is a chance to do triple damage if targeted correctly, none at all if missed, or just normal damage if only one missile hits. The spell in its entirety works for the 1st run through. However, every repeated use afterwards seems to just kill units instantly (I'm imagining that some condition check is not working, particularly with a Unit Group check), and I cannot seem to pin down how to fix the issue.
Help is greatly appreciated!
-
Justice MissileMove and Check Copy
-
Events
- Time - Every 0.01 seconds of game time
- Conditions
-
Actions
- Set Justice_RealCounter = (Justice_RealCounter + 0.01)
-
For each (Integer Justice_TempInteger) from 1 to 3, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Justice_RealCounter Less than or equal to 0.70
-
Then - Actions
- Set Justice_TempPoint2[Justice_TempInteger] = (Position of Justice_Missiles[Justice_TempInteger])
- Set Justice_TempPoint[Justice_TempInteger] = (Justice_TempPoint2[Justice_TempInteger] offset by ((Justice_MoveRate x (Cos((Angle from Justice_TempPoint2[Justice_TempInteger] to Justice_TempPoint[0])))), (Justice_MoveRate x (Sin((Angle from Justice_TempPoint2[Justice_TempInteger] to Justice_TempPoint[0])
- Unit - Move Justice_Missiles[Justice_TempInteger] instantly to Justice_TempPoint[Justice_TempInteger]
- Set Justice_UnitGroupDmg[Justice_TempInteger] = (Units within 100.00 of Justice_TempPoint[Justice_TempInteger])
-
Unit Group - Pick every unit in Justice_UnitGroupDmg[Justice_TempInteger] and do (Actions)
-
Loop - Actions
-
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 Justice_Missiles[Justice_TempInteger])) Equal to True
- ((Picked unit) is in Justice_UnitGroupChecks[Justice_TempInteger]) Equal to False
-
Then - Actions
- Unit Group - Add (Picked unit) to Justice_UnitGroupChecks[Justice_TempInteger]
- Unit - Cause Justice_Missiles[Justice_TempInteger] to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Normal
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call RemoveLocation(udg_Justice_TempPoint[udg_Justice_TempInteger])
- Custom script: call DestroyGroup(udg_Justice_UnitGroupDmg[udg_Justice_TempInteger])
- Custom script: call RemoveLocation(udg_Justice_TempPoint2[udg_Justice_TempInteger])
-
Else - Actions
- Trigger - Turn off (This trigger)
- Unit Group - Remove all units from Justice_UnitGroupChecks[Justice_TempInteger]
- Custom script: call DestroyGroup(udg_Justice_UnitGroupChecks[udg_Justice_TempInteger])
- Unit - Remove Justice_Missiles[Justice_TempInteger] from the game
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Events
-
Justice Phase1
- Events
- Conditions
-
Actions
- Wait 0.50 seconds
- Sound - Play MaievYesAttack2 <gen> at 100.00% volume, attached to Justice_Caster
-
For each (Integer Justice_TempInteger) from 1 to 3, do (Actions)
-
Loop - Actions
- Animation - Play Justice_UnitArray[Justice_TempInteger]'s attack animation, using only Common animations
- Animation - Change Justice_UnitArray[Justice_TempInteger]'s animation speed to 110.00% of its original speed
- Animation - Change Justice_UnitArray[Justice_TempInteger]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
- Set Justice_TempPoint[Justice_TempInteger] = (Position of Justice_UnitArray[Justice_TempInteger])
- Unit - Create 1 Dummy Unit (Glaive Missile) for (Owner of Justice_UnitArray[Justice_TempInteger]) at Justice_TempPoint[Justice_TempInteger] facing (Facing of Justice_UnitArray[Justice_TempInteger]) degrees
- Unit - Turn collision for (Last created unit) Off
- Set Justice_Missiles[Justice_TempInteger] = (Last created unit)
- Custom script: call RemoveLocation(udg_Justice_TempPoint[udg_Justice_TempInteger])
-
Loop - Actions
- Set Justice_MoveRate = 10.00
- Set Justice_RealCounter = 0.00
- Trigger - Turn on Justice MissileMove and Check Copy <gen>
- Wait 1.00 seconds
-
For each (Integer Justice_TempInteger) from 1 to 3, do (Actions)
-
Loop - Actions
- Set Temp_Point = (Position of Justice_UnitArray[Justice_TempInteger])
- Special Effect - Create a special effect at Temp_Point using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Animation - Play Justice_UnitArray[Justice_TempInteger]'s spell throw animation
- Custom script: call RemoveLocation(udg_Temp_Point)
-
Loop - Actions
- Wait 1.00 seconds
-
For each (Integer Justice_TempInteger) from 1 to 3, do (Actions)
-
Loop - Actions
- Unit - Remove Justice_UnitArray[Justice_TempInteger] from the game
-
Loop - Actions
Last edited: