• 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 faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] Curious going ons part one, help please.

Status
Not open for further replies.
Level 4
Joined
Jun 16, 2009
Messages
92
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Chilling Winds
  • Actions
    • Set sSquallbringerUnits[2] = (Target unit of ability being cast)
    • Wait (Random real number between 1.00 and 2.00) game-time seconds
    • Set sSquallbringerPoints[2] = (Position of (Target unit of ability being cast))
    • Set sSquallbringerPoints[1] = (sSquallbringerPoints[2] offset by 600.00 towards (Random angle) degrees)
    • Trigger - Turn on Chilling Winds Knockback <gen>
    • Wait 1.50 game-time seconds
    • Trigger - Turn off Chilling Winds Knockback <gen>
    • Wait (Random real number between 1.00 and 2.00) game-time seconds
    • Set sSquallbringerPoints[2] = (Position of (Target unit of ability being cast))
    • Set sSquallbringerPoints[1] = (sSquallbringerPoints[2] offset by 600.00 towards (Random angle) degrees)
    • Trigger - Turn on Chilling Winds Knockback <gen>
    • Wait 1.50 game-time seconds
    • Trigger - Turn off Chilling Winds Knockback <gen>
  • Events
    • Time - Every 0.03 seconds of game time
  • Conditions
    • (sSquallbringerUnits[2] is alive) Equal to True
    • ((Playable map area) contains sSquallbringerUnits[2]) Equal to True
  • Actions
    • Set sSquallbringerPoints[2] = (Position of sSquallbringerUnits[2])
    • If (((Playable map area) contains sSquallbringerPoints[1]) Equal to True) then do (Do nothing) else do (Set sSquallbringerPoints[1] = sSquallbringerPoints[2])
    • Unit - Move sSquallbringerUnits[2] instantly to (sSquallbringerPoints[2] offset by ((Distance between sSquallbringerPoints[2] and sSquallbringerPoints[1]) / 20.00) towards (Angle from sSquallbringerPoints[2] to sSquallbringerPoints[1]) degrees)
    • Special Effect - Create a special effect at sSquallbringerPoints[2] using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
    • Special Effect - Destroy (Last created special effect)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Distance between sSquallbringerPoints[2] and sSquallbringerPoints[1]) Less than or equal to 10.00
      • Then - Actions
        • Trigger - Turn off (This trigger)
      • Else - Actions
        • Do nothing
I realise I'm gonna get yelled at for using Waits, but I assure you, with what I'm going for, there should be no issue.

So, I initiate the cast. It hits with a Frost Nova esque effect, and the target unit of the ability is about to get tossed around like a rag doll.

With a little variation (wait 1) it'll then start the trigger that'll throw the target to the desired point. Keep in mind, the desired point is a random angle at 600 range from the target's position.

So that loops until it stops, then the trigger waits for a bit, then it loops again.

No worries right?
Well, my problem issssss...
It will 'always' anchor the point of the ability being cast, at the center of the map, and not from where the unit was that I cast the spell on.
And there are not even any leak preventing destruction of points in the trigger, as it stands.
 
Level 4
Joined
Jun 16, 2009
Messages
92
Nevermind, fixed it.
Evidently there are some issues with waits and (target unit of ability being cast) if you use the saved variable instead of that command, it's all gravy.
 
Status
Not open for further replies.
Top