• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Spell problem

Status
Not open for further replies.
Level 7
Joined
Feb 18, 2007
Messages
216
So here's my noobish poison nova trigger:
  • PoisonNova
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Poison Nova
    • Actions
      • Unit - Create 1 PoisonNovaDummy for Player 1 (Red) at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire ((Position of (Casting unit)) offset by 50.00 towards 0.00 degrees)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 PoisonNovaDummy for Player 1 (Red) at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire ((Position of (Casting unit)) offset by 50.00 towards 45.00 degrees)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 PoisonNovaDummy for Player 1 (Red) at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire ((Position of (Casting unit)) offset by 50.00 towards 90.00 degrees)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 PoisonNovaDummy for Player 1 (Red) at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire ((Position of (Casting unit)) offset by 50.00 towards 135.00 degrees)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 PoisonNovaDummy for Player 1 (Red) at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire ((Position of (Casting unit)) offset by 50.00 towards 180.00 degrees)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 PoisonNovaDummy for Player 1 (Red) at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire ((Position of (Casting unit)) offset by 50.00 towards 225.00 degrees)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 PoisonNovaDummy for Player 1 (Red) at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire ((Position of (Casting unit)) offset by 50.00 towards 270.00 degrees)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Create 1 PoisonNovaDummy for Player 1 (Red) at (Position of (Casting unit)) facing Default building facing degrees
      • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire ((Position of (Casting unit)) offset by 50.00 towards 315.00 degrees)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
So my problem is that poison bolt are launched as you can see in pic, to random destinations. I want the spell to launch them to every 45 degrees so it makes nova ring. Any idea what's the problem? PoisonNovaProblem.JPGI know i should use loop but i'm not sure how... And i know this is at wrong place.
 
For the loop --

  • PoisonNova
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Poison Nova
    • Actions
      • Set loc = (Position of (Triggering unit))
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Unit - Create 1 PoisonNovaDummy for (Owner of (Triggering unit)) at loc facing 0.00 degrees
          • Set loc2 = (loc offset by 50.00 towards ((Real((Integer A))) x 45.00) degrees)
          • Unit - Order (Last created unit) to Neutral Pandaren Brewmaster - Breath Of Fire loc2
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation( udg_loc2 )
      • Custom script: call RemoveLocation( udg_loc )
There's an unleakified version that should work (using a loop, too), assuming loc and loc2 are Point variables. It also fixes the Player issue you left, and the issue with Begins Casting an ability
 
Status
Not open for further replies.
Back
Top