- Joined
- Feb 15, 2015
- Messages
- 26
Hi all! I'm having problems with my spell. Basically, what it does is creating a circle for 1.5 seconds. After 1.5 seconds, the circle disappears and a cage forms, blocking enemy units from escaping (allies CAN still walk in and out like normal) for a while.
I'm trying to make this spell MUI using arrays variables (This spell does require Bribe's Unit Indexer). It seems so at first: The cage still forms like normal, enemy units of the casters are still unable to leave for the duration of the spell, just one problem: the special effects won't "MUI"-ly disappear. If 2 units cast the spell at the same time, the circle and the cage part only disappear for the first unit. For the other one, the circle and the cage effect persists indefinitely, even though the spell's duration has run out and can no longer hold the enemy units. I know that my special effect coding is the cause, yet I don't really know how to fix it. I have attached the triggers below.
Trigger 1: Forming The Circle
I'm trying to make this spell MUI using arrays variables (This spell does require Bribe's Unit Indexer). It seems so at first: The cage still forms like normal, enemy units of the casters are still unable to leave for the duration of the spell, just one problem: the special effects won't "MUI"-ly disappear. If 2 units cast the spell at the same time, the circle and the cage part only disappear for the first unit. For the other one, the circle and the cage effect persists indefinitely, even though the spell's duration has run out and can no longer hold the enemy units. I know that my special effect coding is the cause, yet I don't really know how to fix it. I have attached the triggers below.
Trigger 1: Forming The Circle
-
Ice Wall Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Ice Wall
-
Actions
- Unit Group - Add (Triggering unit) to IceWallCasterGroup
- Set IceWallCastPoint[(Custom value of (Triggering unit))] = (Target point of ability being cast)
- Set IceWallDuration[(Custom value of (Triggering unit))] = 50.00
-
For each (Integer IceWallInstances[(Custom value of (Triggering unit))]) from 1 to 30, do (Actions)
-
Loop - Actions
- Set IceWallPreAngle = (IceWallPreAngle + (360.00 / (Real(IceWallInstances[(Custom value of (Triggering unit))]))))
- Set IceWallPreEffectPoint[IceWallInstances[(Custom value of (Triggering unit))]] = (IceWallCastPoint[(Custom value of (Triggering unit))] offset by 450.00 towards IceWallPreAngle degrees)
- Special Effect - Create a special effect at IceWallPreEffectPoint[IceWallInstances[(Custom value of (Triggering unit))]] using BasicWaterFlash.mdx
- Set IceWallPreEffect[IceWallInstances[(Custom value of (Triggering unit))]] = (Last created special effect)
- Custom script: call RemoveLocation (udg_IceWallPreEffectPoint[udg_IceWallInstances[GetUnitUserData(GetTriggerUnit())]])
-
Loop - Actions
-
Events
-
Ice Wall Init
-
Events
- Time - Every 0.03 seconds of game time
-
Conditions
- (Number of units in IceWallCasterGroup) Greater than 0
-
Actions
-
Unit Group - Pick every unit in IceWallCasterGroup and do (Actions)
-
Loop - Actions
- Set IceWallCasterCV = (Custom value of (Picked unit))
- Set IceWallDuration[IceWallCasterCV] = (IceWallDuration[IceWallCasterCV] - 1.00)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- IceWallDuration[IceWallCasterCV] Equal to 0.00
-
Then - Actions
- Unit Group - Add (Picked unit) to IceWallDummyGroup
- Unit - Create 1 Dummy for (Owner of (Picked unit)) at IceWallCastPoint[IceWallCasterCV] facing Default building facing degrees
- Unit - Add a (1.40 + (0.40 x (Real((Level of Ice Wall for (Picked unit)))))) second Generic expiration timer to (Last created unit)
- Set IceWallMarker[IceWallCasterCV] = (Last created unit)
-
For each (Integer IceWallLoop[IceWallCasterCV]) from 1 to 30, do (Actions)
-
Loop - Actions
- Special Effect - Destroy IceWallPreEffect[IceWallLoop[IceWallCasterCV]]
- Set IceWallAngle = (IceWallAngle + (360.00 / (Real(IceWallLoop[IceWallCasterCV]))))
- Set IceWallEffectPoint[IceWallLoop[IceWallCasterCV]] = (IceWallCastPoint[IceWallCasterCV] offset by 450.00 towards IceWallAngle degrees)
- Special Effect - Create a special effect at IceWallEffectPoint[IceWallLoop[IceWallCasterCV]] using Abilities\Spells\Undead\FreezingBreath\FreezingBreathTargetArt.mdl
- Set IceWallEffect[IceWallLoop[IceWallCasterCV]] = (Last created special effect)
- Custom script: call RemoveLocation (udg_IceWallEffectPoint[udg_IceWallLoop[udg_IceWallCasterCV]])
-
Loop - Actions
- Custom script: call RemoveLocation (udg_IceWallCastPoint[udg_IceWallCasterCV])
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in IceWallCasterGroup and do (Actions)
-
Events
-
Ice Wall Exec
-
Events
- Time - Every 0.10 seconds of game time
-
Conditions
- (Number of units in IceWallDummyGroup) Greater than 0
-
Actions
-
Unit Group - Pick every unit in IceWallDummyGroup and do (Actions)
-
Loop - Actions
- Set IceWallCV = (Custom value of (Picked unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (IceWallMarker[IceWallCV] is alive) Equal to True
-
Then - Actions
- Set IceWallCaster[IceWallCV] = (Picked unit)
- Set IceWallTempPoint = (Position of IceWallMarker[IceWallCV])
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 350.00 of IceWallTempPoint) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is A structure) Equal to False
- ((Picked unit) is Magic Immune) Equal to False
- ((Picked unit) is hidden) Equal to False
- ((Picked unit) is alive) Equal to True
- ((Picked unit) belongs to an enemy of (Owner of IceWallCaster[IceWallCV])) Equal to True
-
Then - Actions
- Set IceWallTargetPoint = (Position of (Picked unit))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between IceWallTempPoint and IceWallTargetPoint) Greater than 250.00
-
Then - Actions
- Set IceWallOuterPoint = (IceWallTargetPoint offset by 25.00 towards (Angle from IceWallTargetPoint to IceWallTempPoint) degrees)
- Custom script: call SetUnitX (GetEnumUnit(), GetLocationX(udg_IceWallOuterPoint))
- Custom script: call SetUnitY (GetEnumUnit(), GetLocationY(udg_IceWallOuterPoint))
- Custom script: call RemoveLocation (udg_IceWallOuterPoint)
- Else - Actions
-
If - Conditions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call RemoveLocation (udg_IceWallTempPoint)
-
Else - Actions
-
For each (Integer IceWallLoop2[IceWallCV]) from 1 to 30, do (Actions)
-
Loop - Actions
- Special Effect - Destroy IceWallEffect[IceWallLoop2[IceWallCV]]
-
Loop - Actions
- Unit Group - Remove IceWallCaster[IceWallCV] from IceWallDummyGroup
- Unit Group - Remove IceWallMarker[IceWallCV] from IceWallDummyGroup
-
For each (Integer IceWallLoop2[IceWallCV]) from 1 to 30, do (Actions)
-
If - Conditions
-
Loop - Actions
-
Unit Group - Pick every unit in IceWallDummyGroup and do (Actions)
-
Events