- Joined
- May 11, 2012
- Messages
- 2,103
Well something here is clearly wrong which I can't see whole day....
Making my first MUI spell, and the problem is in here: When I cast it few times in a row, the dummies move normally towards target, but when the first missile reaches the target, all of the missiles suddenly stop and don't move anymore....
Why?
-
Drap Start
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Drap
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MaxIndexDrap1 Equal to 0
-
Then - Actions
- Trigger - Turn on Drap Loop <gen>
- Else - Actions
-
If - Conditions
- Set MaxIndexDrap1 = (MaxIndexDrap1 + 1)
- Set MaxIndexDrap2 = (MaxIndexDrap2 + 1)
- Set Drap_TrigUnitIndex[MaxIndexDrap1] = (Triggering unit)
- Set Drap_TrigUnitPointIndex[MaxIndexDrap1] = (Position of Drap_TrigUnitIndex[MaxIndexDrap1])
- Set Drap_TargetUnitIndex[MaxIndexDrap1] = (Target unit of ability being cast)
- Set Drap_TargetUnitPointIndex[MaxIndexDrap1] = (Position of Drap_TargetUnitIndex[MaxIndexDrap1])
- Unit - Create 1 Dummy Drap for (Owner of Drap_TrigUnitIndex[MaxIndexDrap1]) at Drap_TrigUnitPointIndex[MaxIndexDrap1] facing Drap_TargetUnitPointIndex[MaxIndexDrap1]
- Set Drap_DummyUnitIndex[MaxIndexDrap1] = (Last created unit)
- Custom script: call RemoveLocation(udg_Drap_TrigUnitPointIndex[udg_MaxIndexDrap1])
- Custom script: set udg_Drap_TrigUnitPointIndex[udg_MaxIndexDrap1] = null
- Custom script: call RemoveLocation(udg_Drap_TargetUnitPointIndex[udg_MaxIndexDrap1])
- Custom script: set udg_Drap_TargetUnitPointIndex[udg_MaxIndexDrap1] = null
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Drap Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer Drap_CurrentIndex) from 1 to MaxIndexDrap1, do (Actions)
-
Loop - Actions
- Set Drap_TargetUnitPointIndex[Drap_CurrentIndex] = (Position of Drap_TargetUnitIndex[Drap_CurrentIndex])
- Set Drap_DummyUnitPointIndex[Drap_CurrentIndex] = (Position of Drap_DummyUnitIndex[Drap_CurrentIndex])
- Set Drap_AngleIndex[Drap_CurrentIndex] = (Angle from Drap_DummyUnitPointIndex[Drap_CurrentIndex] to Drap_TargetUnitPointIndex[Drap_CurrentIndex])
- Set Drap_DummyUnitMoveIndex[Drap_CurrentIndex] = (Drap_DummyUnitPointIndex[Drap_CurrentIndex] offset by 20.00 towards Drap_AngleIndex[Drap_CurrentIndex] degrees)
- Unit - Move Drap_DummyUnitIndex[Drap_CurrentIndex] instantly to Drap_DummyUnitMoveIndex[Drap_CurrentIndex], facing Drap_AngleIndex[Drap_CurrentIndex] degrees
- Environment - Create a 0.30 second Temporary crater deformation at Drap_DummyUnitPointIndex[Drap_CurrentIndex] with radius 125.00 and depth 10.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between Drap_DummyUnitPointIndex[Drap_CurrentIndex] and Drap_TargetUnitPointIndex[Drap_CurrentIndex]) Less than or equal to 75.00
-
Then - Actions
- Unit - Kill Drap_DummyUnitIndex[Drap_CurrentIndex]
- Unit - Remove Drap_DummyUnitIndex[Drap_CurrentIndex] from the game
- Unit - Cause Drap_TrigUnitIndex[Drap_CurrentIndex] to damage Drap_TargetUnitIndex[Drap_CurrentIndex], dealing 200.00 damage of attack type Spells and damage type Normal
- Special Effect - Create a special effect at Drap_TargetUnitPointIndex[Drap_CurrentIndex] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Set Drap_TrigUnitIndex[Drap_CurrentIndex] = Drap_TrigUnitIndex[MaxIndexDrap1]
- Set Drap_TrigUnitIndex[MaxIndexDrap1] = No unit
- Set Drap_TargetUnitIndex[Drap_CurrentIndex] = Drap_TargetUnitIndex[MaxIndexDrap1]
- Set Drap_TargetUnitIndex[MaxIndexDrap1] = No unit
- Set Drap_DummyUnitIndex[Drap_CurrentIndex] = Drap_DummyUnitIndex[MaxIndexDrap1]
- Set Drap_DummyUnitIndex[MaxIndexDrap1] = No unit
- Set MaxIndexDrap2 = (MaxIndexDrap2 - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- MaxIndexDrap2 Equal to 0
-
Then - Actions
- Set MaxIndexDrap1 = 0
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation(udg_Drap_TargetUnitPointIndex[udg_Drap_CurrentIndex])
- Custom script: set udg_Drap_TargetUnitPointIndex[udg_Drap_CurrentIndex] = null
- Custom script: call RemoveLocation(udg_Drap_DummyUnitPointIndex[udg_Drap_CurrentIndex])
- Custom script: set udg_Drap_DummyUnitPointIndex[udg_Drap_CurrentIndex] = null
- Custom script: call RemoveLocation(udg_Drap_DummyUnitMoveIndex[udg_Drap_CurrentIndex])
- Custom script: set udg_Drap_DummyUnitMoveIndex[udg_Drap_CurrentIndex] = null
-
Loop - Actions
-
For each (Integer Drap_CurrentIndex) from 1 to MaxIndexDrap1, do (Actions)
-
Events
Why?