• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Unit returning to inital position

Status
Not open for further replies.
Level 1
Joined
Jul 23, 2019
Messages
3
I've been trying to make an omnislash-esque trigger however slightly more complicated (for me, i'm fairly new at triggers and vjass impossible for me)

What I had in mind is

Unit casts ability > Get units within initial cast aoe put them into a group > move to unit position, remove them from unit group (for the single hit) > then move back to initial cast position

however I can't seem return my unit to my initial point and I don't know which condition to use and some help would be appreciated. Here's the trigger so far:

  • FlashCast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Flash Strike
    • Actions
      • Set Shiki = (Triggering unit)
      • Set ShikiFlashInitPos = (Position of Shiki)
      • Set ShikiFlashGroup[1] = (Units within 1300.00 of (Position of Shiki) matching ((((Matching unit) belongs to an enemy of (Owner of Shiki)) Equal to True) and ((((Matching unit) is invulnerable) Equal to False) and (((Matching unit) is alive) Equal to True))))
      • Animation - Change Shiki's vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
      • For each (Integer A) from 1 to 9, do (Actions)
        • Loop - Actions
          • Set ShikiFlashGroup[2] = (Random 1 units from ShikiFlashGroup[1])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in ShikiFlashGroup[1]) Greater than 0
            • Then - Actions
              • Unit Group - Pick every unit in ShikiFlashGroup[2] and do (Actions)
                • Loop - Actions
                  • Set ShikiFlashReal = (ShikiFlashReal + 1.00)
                  • Set ShikiFlashPickedUnit = (Picked unit)
                  • Set ShikiFlashPickedUnitLoc = (Position of ShikiFlashPickedUnit)
                  • Unit - Move Shiki instantly to ShikiFlashPickedUnitLoc
                  • Unit Group - Remove ShikiFlashPickedUnit from ShikiFlashGroup[1]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ShikiFlashReal Equal to 9.00
                    • Then - Actions
                      • Unit - Move Shiki instantly to ShikiFlashInitPos
                      • Animation - Change Shiki's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
                      • Custom script: call DestroyGroup(udg_ShikiFlashGroup[2])
                      • Custom script: call DestroyGroup(udg_ShikiFlashGroup[1])
                      • Custom script: call RemoveLocation(udg_ShikiFlashInitPos)
                      • Set ShikiFlashReal = 0.00
                    • Else - Actions
            • Else - Actions
 
Status
Not open for further replies.
Top