• 🏆 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!

Cast abilities in circle; doesn't work

Status
Not open for further replies.
Level 22
Joined
Jan 10, 2005
Messages
3,426
Right now I got this trigger:

  • Events
    • Unit - A unit enters (Playable map area)
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Triggering unit)) Equal to Burning Oil Ward
      • Then - Actions
        • For each (Integer A) from 1 to 10, do (Actions)
          • Loop - Actions
            • Unit - Create 1 Burning Oil Wave for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing ((Position of (Triggering unit)) offset by 100.00 towards (360.00 / (10.00 x (Real((Integer A))))) degrees)
            • Unit - Order (Last created unit) to Neutral - Breath Of Frost ((Position of (Triggering unit)) offset by 100.00 towards (360.00 / (10.00 x (Real((Integer A))))) degrees)
      • Else - Actions
        • Do nothing
But the problem is that those dummy units always cast their wave on one spot, even though I put them in the correct facing.
 
Hm, use variables and it will work.
  • Set Points[1] = (Position of (Triggering unit))
  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • Set Points[2] = (Points[1] offset by 100.00 towards (36.00 x (Real(IntegerA))) degrees)
      • Unit - Create 1 Burning Oil Wave for (Owner of (Triggering unit)) at Points[1] facing Points[2]
      • Unit - Order (Last created unit) to Neutral - Breath of Frost Points[2]
      • Custom script: call RemoveLocation (udg_Points[2])
  • Custom script: call RemoveLocation (udg_Points[1])
Remove the "Do nothing" action. The system will by default do nothing, if there are no actions placed. It takes up bits of memory for no reason. Use it only in "Else" action, in the If/Then/Else action, not the If/Then/Else, Multiple actions.
 
Status
Not open for further replies.
Top