- Joined
- Apr 14, 2012
- Messages
- 2,901
Hello;
I created a spell the other day that creates a circle of war-stomps, then makes the caster omnislash around the battlefield. My problem is, when the caster omnislashes, instead of showing that the caster stops at one location to play the attack anim and damage the Picked Unit before going on to the next, the spell shows that the caster kills multiple units in one, big hit.
Understandable because there are no forms of waits that would make the slasher wait temporarily from loc to loc. That's why I came here, because I don't know how to make the caster wait temporarily from the Picked Unit's location before SetUnitPositionLoc takes place and moves the caster to the next Picked Unit's location.
Here are the triggers:
I might have cut off the trigger but to tell you the truth the rest of the trigger is just for recycling the instance, not much to see.
Could you help me?
I created a spell the other day that creates a circle of war-stomps, then makes the caster omnislash around the battlefield. My problem is, when the caster omnislashes, instead of showing that the caster stops at one location to play the attack anim and damage the Picked Unit before going on to the next, the spell shows that the caster kills multiple units in one, big hit.
Understandable because there are no forms of waits that would make the slasher wait temporarily from loc to loc. That's why I came here, because I don't know how to make the caster wait temporarily from the Picked Unit's location before SetUnitPositionLoc takes place and moves the caster to the next Picked Unit's location.
Here are the triggers:
I might have cut off the trigger but to tell you the truth the rest of the trigger is just for recycling the instance, not much to see.
-
ZS Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer ZS_CurrentIndex) from 1 to ZS_MaxIndex, do (Actions)
-
Loop - Actions
- Set ZS_Counter[ZS_CurrentIndex] = (ZS_Counter[ZS_CurrentIndex] + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ZS_Counter[ZS_CurrentIndex] Equal to 30
-
Then - Actions
- -------- [START] Circle War Stomp [START] --------
- Set ZS_CasterLoc[ZS_CurrentIndex] = (Position of ZS_Caster[ZS_CurrentIndex])
-
For each (Integer ZS_CirclInt) from 1 to ZS_StartCircleNumber, do (Actions)
-
Loop - Actions
- Set ZS_TempPoint[ZS_CurrentIndex] = (ZS_CasterLoc[ZS_CurrentIndex] offset by ZS_StartCircleOffset towards ((Real(ZS_CirclInt)) x (360.00 / (Real(ZS_StartCircleNumber)))) degrees)
- Unit - Create 1 ZS_StartDummy for ZS_TempPlayer[ZS_CurrentIndex] at ZS_TempPoint[ZS_CurrentIndex] facing Default building facing degrees
- Set ZS_Dummy[ZS_CirclInt] = (Last created unit)
- Unit - Add a 0.30 second Generic expiration timer to ZS_Dummy[ZS_CirclInt]
-
Loop - Actions
- Set ZS_TempGroup1[ZS_CurrentIndex] = (Units within 300.00 of ZS_CasterLoc[ZS_CurrentIndex] matching (((Matching unit) belongs to an enemy of ZS_TempPlayer[ZS_CurrentIndex]) Equal to True))
-
Unit Group - Pick every unit in ZS_TempGroup1[ZS_CurrentIndex] and do (Actions)
-
Loop - Actions
- Unit - Cause ZS_Caster[ZS_CurrentIndex] to damage (Picked unit), dealing ZS_StartCircleDamage damage of attack type Chaos and damage type Divine
-
Loop - Actions
- Custom script: call DestroyGroup(udg_ZS_TempGroup1[udg_ZS_CurrentIndex])
- Custom script: call RemoveLocation(udg_ZS_TempPoint[udg_ZS_CurrentIndex])
- -------- [END] Circle War Stomp [END] --------
- -------- [START] Omnislash[START] --------
-
For each (Integer ZS_LoopInt) from 1 to ZS_Omnislash_Loop, do (Actions)
-
Loop - Actions
- Set ZS_TempGroup1[ZS_CurrentIndex] = (Units within ZS_Omnislash_Range of ZS_CasterLoc[ZS_CurrentIndex] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of ZS_TempPlayer[ZS_CurrentIndex]) Equal t
- Set ZS_TempGroup2[ZS_CurrentIndex] = (Random 1 units from ZS_TempGroup1[ZS_CurrentIndex])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in ZS_TempGroup1[ZS_CurrentIndex]) Greater than 0
-
Then - Actions
- Animation - Change ZS_Caster[ZS_CurrentIndex]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
- Animation - Change ZS_Caster[ZS_CurrentIndex]'s animation speed to 50.00% of its original speed
-
Unit Group - Pick every unit in ZS_TempGroup2[ZS_CurrentIndex] and do (Actions)
-
Loop - Actions
- Set ZS_PickedUnit[ZS_CurrentIndex] = (Picked unit)
- Set ZS_PickedUnitLoc[ZS_CurrentIndex] = (Position of ZS_PickedUnit[ZS_CurrentIndex])
- Custom script: call SetUnitPositionLoc( udg_ZS_Caster[udg_ZS_CurrentIndex], udg_ZS_PickedUnitLoc[udg_ZS_CurrentIndex])
- Special Effect - Create a special effect at ZS_PickedUnitLoc[ZS_CurrentIndex] using Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Custom script: call RemoveLocation( udg_ZS_PickedUnitLoc[udg_ZS_CurrentIndex])
- Custom script: set udg_ZS_PickedUnitLoc[udg_ZS_CurrentIndex] = null
- Animation - Play ZS_Caster[ZS_CurrentIndex]'s ZS_Omnislash_AttackAnim animation
- Unit - Cause ZS_Caster[ZS_CurrentIndex] to damage ZS_PickedUnit[ZS_CurrentIndex], dealing ZS_Omnislash_Damage damage of attack type ZS_Omnislash_AttackType and damage type ZS_Omnislash_DamageType
- Special Effect - Create a special effect attached to the ZS_Omnislash_AttachPoint of ZS_Caster[ZS_CurrentIndex] using ZS_Omnislash_Sfx
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
- Custom script: call DestroyGroup( udg_ZS_TempGroup1[udg_ZS_CurrentIndex])
- Custom script: call DestroyGroup( udg_ZS_TempGroup2[udg_ZS_CurrentIndex])
- Animation - Change ZS_Caster[ZS_CurrentIndex]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
- Animation - Change ZS_Caster[ZS_CurrentIndex]'s animation speed to 100.00% of its original speed
- Set ZS_Omniboolean[ZS_CurrentIndex] = True
-
Else - Actions
- Custom script: call DestroyGroup( udg_ZS_TempGroup1[udg_ZS_CurrentIndex])
- Custom script: call DestroyGroup( udg_ZS_TempGroup2[udg_ZS_CurrentIndex])
- Set ZS_Omniboolean[ZS_CurrentIndex] = False
-
If - Conditions
-
Loop - Actions
- -------- [END] Omnislash[END] --------
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
For each (Integer ZS_CurrentIndex) from 1 to ZS_MaxIndex, do (Actions)
-
Events
Could you help me?