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

[General] Skillshot in cone

Status
Not open for further replies.
Level 5
Joined
Dec 25, 2018
Messages
110
I want my hero to throw 3 projectiles in a cone, something like this:
upload_2019-12-18_13-15-1.png

I tried doing it like this:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Facing of SS_Caster[SS_iM]) Less than or equal to 360.00
              • (Facing of SS_Caster[SS_iM]) Greater than or equal to 300.00
          • And - All (Conditions) are true
            • Conditions
              • (Facing of SS_Caster[SS_iM]) Greater than or equal to 150.00
              • (Facing of SS_Caster[SS_iM]) Less than or equal to 250.00
    • Then - Actions
      • Set SS_tLoc[SS_iM] = (PositionOfChargedSpell[(Player number of (Owner of (Triggering unit)))] offset by (0.00, -130.00))
    • Else - Actions
      • Set SS_tLoc[SS_iM] = (PositionOfChargedSpell[(Player number of (Owner of (Triggering unit)))] offset by (-130.00, 0.00))
But that's not consistent, does anyone know smarter way to do it?
 
This method is the most flexible.
Ignore the leaks and obvious shit.
  • Melee Initialization
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave
    • Actions
      • Set ConeWidth = 90.00
      • Set Projectiles = 3
      • Set ConeWidthSpread = (ConeWidth / (Real(Projectiles)))
      • Set TemporaryReal = ((Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) - (ConeWidth / 2.00))
      • For each (Integer A) from 1 to Projectiles, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) facing (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees
          • Unit - Add Shockwave to (Last created unit)
          • Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave ((Position of (Triggering unit)) offset by 600.00 towards TemporaryReal degrees)
          • Set TemporaryReal = (TemporaryReal + ConeWidthSpread)
 
Status
Not open for further replies.
Back
Top