- Joined
- Apr 23, 2011
- Messages
- 527
i tried to make a configurable MUI spell, but i'm new to making one.
basically, this ability fires 5 carrion swarms at a cone thrice over 0.9 seconds. i pause the unit so the player can't control the unit, change its facing, and make the ability look weird. problem is, when multiple units cast it at once, the first unit that casts it does not get unpaused.
can anyone with MUI spell knowledge help me on this? i'd appreciate it if you do.
basically, this ability fires 5 carrion swarms at a cone thrice over 0.9 seconds. i pause the unit so the player can't control the unit, change its facing, and make the ability look weird. problem is, when multiple units cast it at once, the first unit that casts it does not get unpaused.
-
Rain Config
-
Events
- Map initialization
- Conditions
-
Actions
- -------- Sets the dummy type --------
- Set R_dummytype = Dummy
- -------- Sets the ability used by the hero --------
- Set R_ability = Rain
- -------- Sets the dummy ability cast by the dummy unit --------
- Set R_dummyability = Rain (Dummy)
- -------- Sets interval between shots --------
- Set R_interval = 0.30
- -------- Sets spell duration --------
- Set R_spellduration = 0.90
-
Events
-
Rain Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to R_ability
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- R_index[1] Equal to 0
-
Then - Actions
- Trigger - Turn on Rain Loop <gen>
- Else - Actions
-
If - Conditions
- Set R_index[1] = (R_index[1] + 1)
- Set R_time[R_index[1]] = 0.00
- Set R_duration[R_index[1]] = R_spellduration
- Set R_caster[R_index[1]] = (Casting unit)
- Unit - Pause R_caster[R_index[1]]
- Set R_location = (Position of R_caster[R_index[1]])
- Set R_facing = (Facing of R_caster[R_index[1]])
- Unit - Create 1 R_dummytype for (Owner of (Casting unit)) at R_location facing Default building facing degrees
- Set R_dummy[R_index[1]] = (Last created unit)
- Unit - Add R_dummyability to R_dummy[R_index[1]]
- Unit - Set level of R_dummyability for R_dummy[R_index[1]] to (Level of R_ability for R_caster[R_index[1]])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Rain Loop
-
Events
- Time - Every 0.30 seconds of game time
- Conditions
-
Actions
- Set R_location = (Position of R_caster[R_index[1]])
- Set R_direction = (R_location offset by 25.00 towards (R_facing + 30.00) degrees)
- Unit - Order R_dummy[R_index[1]] to Undead Dreadlord - Carrion Swarm R_direction
- Custom script: call RemoveLocation(udg_R_direction)
- Custom script: call RemoveLocation(udg_R_location)
- Set R_location = (Position of R_caster[R_index[1]])
- Set R_direction = (R_location offset by 25.00 towards (R_facing + 15.00) degrees)
- Unit - Order R_dummy[R_index[1]] to Undead Dreadlord - Carrion Swarm R_direction
- Custom script: call RemoveLocation(udg_R_direction)
- Custom script: call RemoveLocation(udg_R_location)
- Set R_location = (Position of R_caster[R_index[1]])
- Set R_direction = (R_location offset by 25.00 towards R_facing degrees)
- Unit - Order R_dummy[R_index[1]] to Undead Dreadlord - Carrion Swarm R_direction
- Custom script: call RemoveLocation(udg_R_direction)
- Custom script: call RemoveLocation(udg_R_location)
- Set R_location = (Position of R_caster[R_index[1]])
- Set R_direction = (R_location offset by 25.00 towards (R_facing - 15.00) degrees)
- Unit - Order R_dummy[R_index[1]] to Undead Dreadlord - Carrion Swarm R_direction
- Custom script: call RemoveLocation(udg_R_direction)
- Custom script: call RemoveLocation(udg_R_location)
- Set R_location = (Position of R_caster[R_index[1]])
- Set R_direction = (R_location offset by 25.00 towards (R_facing - 30.00) degrees)
- Unit - Order R_dummy[R_index[1]] to Undead Dreadlord - Carrion Swarm R_direction
- Custom script: call RemoveLocation(udg_R_direction)
- Custom script: call RemoveLocation(udg_R_location)
-
For each (Integer R_index[0]) from 1 to R_index[1], do (Actions)
-
Loop - Actions
- Set R_time[R_index[0]] = (R_time[R_index[0]] + R_interval)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- R_time[R_index[0]] Equal to R_duration[R_index[0]]
-
Then - Actions
- Unit - Unpause R_caster[R_index[1]]
- Unit - Remove R_dummy[R_index[1]] from the game
- Set R_caster[R_index[0]] = R_caster[R_index[1]]
- Set R_dummy[R_index[0]] = R_dummy[R_index[1]]
- Unit - Unpause R_caster[R_index[1]]
- Unit - Remove R_dummy[R_index[1]] from the game
- Set R_index[1] = (R_index[1] - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- R_index[1] Equal to 0
-
Then - Actions
- Set R_index[0] = 0
- Set R_index[1] = 0
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Events