• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[Trigger] A spell that pulls all enemy units towards it, then explodes?

Status
Not open for further replies.
Level 6
Joined
Apr 23, 2009
Messages
94
It's hard for me to figure this one out.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Webbed One
    • Actions
      • Set WebCaster = (Casting unit)
      • Set WebbedOne = (Target point of ability being cast)
      • Unit - Create 1 Webbed One for (Owner of (Casting unit)) at WebbedOne facing Default building facing degrees
      • Trigger - Turn on Untitled Trigger 003 <gen>
  • Untitled Trigger 003
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 600.00 of (Position of WebCaster) matching (((Owner of (Matching unit)) is an enemy of (Owner of WebCaster)) Equal to True)) and do (Actions)
        • Loop - Actions
          • Set WebbedUnit = (Position of (Picked unit))
          • Unit - Move (Picked unit) instantly to (WebbedUnit offset by (2.00, 2.00)), facing Default building facing degrees
This is my awful attempt at it. But so far:
1.The Unit doesn't move towards the cast point.
2.I have no way of turning it off without using Waits.

Will someone please enlighten me?
 
Level 10
Joined
Jan 21, 2007
Messages
576
  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Webbed One
    • Actions
      • Set WebCaster = (Casting unit)
      • Set WebbedOne = (Target point of ability being cast)
      • Unit - Create 1 Webbed One for (Owner of (Triggering Unit)) at WebbedOne facing Default building facing degrees
      • Trigger - Turn on Loop <gen>
  • Loop
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Playable map area) matching ((Unit-type of (Triggering unit)) Equal to WebbedOne)) and do (Actions)
        • Loop - Actions
          • Set unitvariable = (Picked Unit)
          • Unit Group - Pick every unit in (Units within 600.00 of (Position of (Picked unit)) matching (((Owner of (Matching unit)) is an enemy of (Owner of (Picked unit))) Equal to True)) and do (Actions)
            • Loop - Actions
              • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 2.00 towards (Angle from (Position of (Picked unit)) to (Position of (unitvariable))) degrees)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Distance between (Position of (Picked unit)) and (Position of (unitvariable))) Less than or equal to 100.00
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
This is leaky and done in a hurry, but shows you the general idea of how to do this none-the-less.
 
Level 10
Joined
Jan 21, 2007
Messages
576
The interval of the timer doesn't matter, was just showing him how to do it (unless you were talking to him). What gives you the impression there is only one unit being moved? And the units aren't being pulled towards the caster.
 
Status
Not open for further replies.
Top