• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

My spell only picks ONE unit, it have to pick ALL.

Status
Not open for further replies.
Level 13
Joined
Feb 18, 2009
Messages
1,381
See I want to pick ALL units and move them, but it does not!

  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Nature Explosion
    • Actions
      • Set TriggerUnit = (Triggering unit)
      • -------- /// CUSTOM VALUE \\\ --------
      • Set Int = (Custom value of (Triggering unit))
      • -------- /// TRIGGERUNIT POSITION \\\ --------
      • Set PositionTriggerUnit = (Position of (Triggering unit))
      • -------- /// DAMAGE \\\ --------
      • Set Damage = 150.00
      • -------- /// SPECIAL EFFECT \\\ --------
      • Special Effect - Create a special effect at PositionTriggerUnit using war3mapImported\AncientExplode.mdx
      • Special Effect - Destroy (Last created special effect)
      • -------- /// SPECIAL EFFECT (ADDITIONAL) \\\ --------
      • Special Effect - Create a special effect at PositionTriggerUnit using Abilities\Spells\NightElf\FanOfKnives\FanOfKnivesCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • -------- /// DRAWING TO PERSON SPEED \\\ --------
      • Set DrawingSpeed[Int] = 10.00
      • Unit Group - Pick every unit in (Units within 500.00 of PositionTriggerUnit) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Equal to (Unit-type of (Triggering unit))
            • Then - Actions
            • Else - Actions
              • Set OneUnluckyUnit = (Picked unit)
              • Unit Group - Add OneUnluckyUnit to UnluckyUnits
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing Damage damage of attack type Spells and damage type Normal
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Move unit forth <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Move unit forth <gen>
        • Else - Actions
  • Move unit forth
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in UnluckyUnits and do (Actions)
        • Loop - Actions
          • Set UnluckyUnitPoint = (Position of OneUnluckyUnit)
          • Set PositionTriggerUnit = (Position of TriggerUnit)
          • Set TempPoint = (UnluckyUnitPoint offset by DrawingSpeed[Int] towards (Angle from UnluckyUnitPoint to PositionTriggerUnit) degrees)
          • Unit - Move OneUnluckyUnit instantly to TempPoint
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between UnluckyUnitPoint and PositionTriggerUnit) Equal to 150.00
            • Then - Actions
              • Unit Group - Remove OneUnluckyUnit from UnluckyUnits
              • Unit Group - Add OneUnluckyUnit to UnluckyUnits2
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (And back <gen> is on) Equal to False
                • Then - Actions
                  • Trigger - Turn on And back <gen>
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in UnluckyUnits) Equal to 0
                • Then - Actions
                  • Custom script: call RemoveLocation(udg_UnluckyUnitPoint)
                  • Custom script: call RemoveLocation(udg_TempPoint)
                  • Custom script: call RemoveLocation(udg_PositionTriggerUnit)
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions


UPDATED TRIGGERS
 
Last edited:
Level 13
Joined
Feb 18, 2009
Messages
1,381
Like this
(Did a little more editting)
  • Move unit forth
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in UnluckyUnits and do (Actions)
        • Loop - Actions
          • Set UnluckyUnitPoint = (Position of OneUnluckyUnit)
          • Set PositionTriggerUnit = (Position of TriggerUnit)
          • Set TempPoint = (UnluckyUnitPoint offset by DrawingSpeed[Int] towards (Angle from UnluckyUnitPoint to PositionTriggerUnit) degrees)
          • Unit - Move OneUnluckyUnit instantly to TempPoint
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Distance between UnluckyUnitPoint and PositionTriggerUnit) Equal to 200.00
            • Then - Actions
              • Unit Group - Remove OneUnluckyUnit from UnluckyUnits
              • Unit Group - Add OneUnluckyUnit to UnluckyUnits2
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (And back <gen> is on) Equal to False
                • Then - Actions
                  • Trigger - Turn on And back <gen>
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Number of units in UnluckyUnits) Equal to 0
                • Then - Actions
                  • Custom script: call RemoveLocation(udg_UnluckyUnitPoint)
                  • Custom script: call RemoveLocation(udg_TempPoint)
                  • Custom script: call RemoveLocation(udg_PositionTriggerUnit)
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
 
Status
Not open for further replies.
Top