- Joined
- Aug 6, 2009
- Messages
- 697
Heres the problem,this spell IS MUI but when 2 users cast at the exact same time the collision is turned off after the spell is cast and done.
Trigger 1,Starting and setting up the loop:
Trigger 1,Starting and setting up the loop:
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to ShockyWavey
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Index Equal to 0
-
-
Then - Actions
-
Trigger - Turn on Loop <gen>
-
-
Else - Actions
-
-
Set MUI = (MUI + 1)
-
Set Index = (Index + 1)
-
Set TurnOn[MUI] = True
-
Set Caster[MUI] = (Casting unit)
-
Set casterpos = (Position of Caster[MUI])
-
Set targetpoint = (Target point of ability being cast)
-
Set distance[MUI] = (Distance between casterpos and targetpoint)
-
Set angle[MUI] = (Angle from casterpos to targetpoint)
-
Set moved[MUI] = 0.00
-
Unit - Turn collision for Caster[MUI] Off
-
Custom script: call RemoveLocation(udg_targetpoint)
-
Custom script: call RemoveLocation(udg_casterpos)
-
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Actions
-
For each (Integer Loop) from 1 to MUI, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
TurnOn[Loop] Equal to True
-
-
Then - Actions
-
Set slide1 = (Position of Caster[Loop])
-
Set slide2 = (slide1 offset by 30.00 towards angle[Loop] degrees)
-
Set moved[Loop] = (moved[Loop] + 30.00)
-
Special Effect - Create a special effect attached to the origin of Caster[Loop] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
-
Special Effect - Destroy (Last created special effect)
-
Unit - Move Caster[Loop] instantly to slide2
-
Custom script: call RemoveLocation(udg_slide1)
-
Custom script: call RemoveLocation(udg_slide2)
-
Unit Group - Pick every unit in (Units within 500.00 of (Position of Caster[Loop]) matching (((Matching unit) belongs to an enemy of (Owner of Caster[Loop])) Equal to True)) and do (Actions)
-
Loop - Actions
-
Unit - Cause Caster[Loop] to damage (Picked unit), dealing 10.00 damage of attack type Spells and damage type Normal
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Caster[Loop] is dead) Equal to True) or (moved[Loop] Greater than or equal to distance[Loop])
-
-
Then - Actions
-
Unit - Turn collision for Caster[MUI] On
-
Set Index = (Index - 1)
-
Set Caster[Loop] = No unit
-
Set angle[Loop] = 0.00
-
Set distance[Loop] = 0.00
-
Set moved[Loop] = 0.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Index Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
Set MUI = 0
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
Last edited: