- Joined
- Jun 25, 2009
- Messages
- 427
Hey guys, long time no see. So i started making MUI spells (multiinstansable=multiple units can cast it at the same time) so yeah, i made one spell for the "Hive spellpack" and it's MUI, it works, but one thing doesn't. The spell does this: i use it, i rush 600 range (through triggers) picking units in 150 aoe and dealing somewhat damage and then stopping.
The problem: when one unit uses it, it works and only damages the units one time. BUUUUT when two or more units use it, it works, but damages the same unit in 150 for about 100 times while picking.
The triggers.
And the second one
I would be friggin' happy if you helped me solve this, cause this is the second time i have problems with it.
For your help i will give a +rep.
Tiche3
The problem: when one unit uses it, it works and only damages the units one time. BUUUUT when two or more units use it, it works, but damages the same unit in 150 for about 100 times while picking.
The triggers.
-
Sonic Rush
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Sonic Rush
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Sonic_Rush_Mui_Turnoff Equal to 0
-
Then - Actions
- Trigger - Turn on Sonic Rush Loop <gen>
- Else - Actions
-
If - Conditions
- Set Sonic_Rush_Mui_Integer = (Sonic_Rush_Mui_Integer + 1)
- Set Sonic_Rush_Mui_Turnoff = (Sonic_Rush_Mui_Turnoff + 1)
- Set Sonic_Rush_Distance[Sonic_Rush_Mui_Integer] = 600
- Set Sonic_Rush_Facing[Sonic_Rush_Mui_Integer] = (Facing of (Triggering unit))
- Set Sonic_Rush_Off[Sonic_Rush_Mui_Integer] = True
- Set Sonic_Rush_Rusher[Sonic_Rush_Mui_Integer] = (Triggering unit)
- Unit - Turn collision for (Triggering unit) Off
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Level of Focused Force for (Triggering unit)) Less than or equal to 1
-
Then - Actions
- Unit - Remove Focused Force from (Triggering unit)
-
Else - Actions
- Unit - Decrease level of Focused Force for (Triggering unit)
-
If - Conditions
- Set Sonic_Rush_Damage[Sonic_Rush_Mui_Integer] = ((100.00 x (Real((Level of Sonic Rush for (Triggering unit))))) + (20.00 x (Real((Level of Focused Force for (Triggering unit))))))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Sonic Rush Loop
-
Events
- Time - Every 0.04 seconds of game time
- Conditions
-
Actions
-
For each (Integer Sonic_Rush_Mui_Loop) from 1 to Sonic_Rush_Mui_Integer, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Sonic_Rush_Off[Sonic_Rush_Mui_Loop] Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Sonic_Rush_Distance[Sonic_Rush_Mui_Loop] Less than or equal to 0
-
Then - Actions
- Unit - Turn collision for Sonic_Rush_Rusher[Sonic_Rush_Mui_Loop] On
- Unit Group - Remove all units from Sonic_Rush_Group_2[Sonic_Rush_Mui_Loop]
- Set Sonic_Rush_Mui_Turnoff = (Sonic_Rush_Mui_Turnoff - 1)
- Set Sonic_Rush_Off[Sonic_Rush_Mui_Loop] = False
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Sonic_Rush_Mui_Turnoff Equal to 0
-
Then - Actions
- Set Sonic_Rush_Mui_Integer = 0
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Else - Actions
- Set Sonic_Rush_Pos = (Position of Sonic_Rush_Rusher[Sonic_Rush_Mui_Loop])
- Set Sonic_Rush_Pos_Off = (Sonic_Rush_Pos offset by 48.00 towards Sonic_Rush_Facing[Sonic_Rush_Mui_Loop] degrees)
- Set Sonic_Rush_Distance[Sonic_Rush_Mui_Loop] = (Sonic_Rush_Distance[Sonic_Rush_Mui_Loop] - 48)
- -------- The problem i guess is somewhere here --------
- Set Sonic_Rush_Group = (Units within 150.00 of Sonic_Rush_Pos matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of Sonic_Rush_Rusher[Sonic_Rush_Mui_Loop])) Equal to True) and ((((Matching unit) is alive) Equal to True)
- -------- ^ And matching unit is not in Sonic_Rush_Group_2[Sonic_Rush_Mui_Loop] --------
- Unit Group - Add all units of Sonic_Rush_Group to Sonic_Rush_Group_2[Sonic_Rush_Mui_Loop]
-
Unit Group - Pick every unit in Sonic_Rush_Group and do (Actions)
-
Loop - Actions
- Unit - Cause Sonic_Rush_Rusher[Sonic_Rush_Mui_Loop] to damage (Picked unit), dealing Sonic_Rush_Damage[Sonic_Rush_Mui_Loop] damage of attack type Normal and damage type Normal
- Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
- Set Sonic_Rush_Sfx = (Last created special effect)
- Special Effect - Destroy Sonic_Rush_Sfx
-
Loop - Actions
- -------- The problem i guess is somewhere ABOVE --------
- Special Effect - Create a special effect attached to the chest of Sonic_Rush_Rusher[Sonic_Rush_Mui_Loop] using Abilities\Spells\Human\Defend\DefendCaster.mdl
- Set Sonic_Rush_Sfx = (Last created special effect)
- Special Effect - Destroy Sonic_Rush_Sfx
- Special Effect - Create a special effect attached to the chest of Sonic_Rush_Rusher[Sonic_Rush_Mui_Loop] using Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
- Set Sonic_Rush_Sfx = (Last created special effect)
- Special Effect - Destroy Sonic_Rush_Sfx
- Special Effect - Create a special effect attached to the chest of Sonic_Rush_Rusher[Sonic_Rush_Mui_Loop] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
- Set Sonic_Rush_Sfx = (Last created special effect)
- Special Effect - Destroy Sonic_Rush_Sfx
- Unit - Move Sonic_Rush_Rusher[Sonic_Rush_Mui_Loop] instantly to Sonic_Rush_Pos_Off, facing Sonic_Rush_Facing[Sonic_Rush_Mui_Loop] degrees
- Special Effect - Create a special effect attached to the chest of Sonic_Rush_Rusher[Sonic_Rush_Mui_Loop] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
- Set Sonic_Rush_Sfx = (Last created special effect)
- Special Effect - Destroy Sonic_Rush_Sfx
- Custom script: call RemoveLocation(udg_Sonic_Rush_Pos)
- Custom script: call RemoveLocation(udg_Sonic_Rush_Pos_Off)
- Custom script: call DestroyGroup(udg_Sonic_Rush_Group)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer Sonic_Rush_Mui_Loop) from 1 to Sonic_Rush_Mui_Integer, do (Actions)
-
Events
For your help i will give a +rep.
Tiche3