• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Mass Flamestrike

Status
Not open for further replies.
Level 6
Joined
Aug 27, 2013
Messages
103
I want my boss to cast flamestrikes at random points around him. I know that i create dummy unit, give it flamestrike, but i don't know how to cast it multiple times at random points.

Edit: Or it can be to cast on location of my hero mutliple times with pause 2-3 seconds between flamestrikes

Edit2:
  • mass flamestrike
    • Events
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Set position = (Position of Dreadlord 0000 <gen>)
      • Unit - Create 1 dummy for Player 1 (Red) at (Position of Blood Mage 0019 <gen>) facing Default building facing degrees
      • Set flamestrike = (Last created unit)
      • Unit - Add Flame Strike (Neutral Hostile 2) to flamestrike
      • Unit - Order flamestrike to Human Blood Mage - Flame Strike position
      • Unit - Add a 2.00 second Generic expiration timer to flamestrike
  • mass fs 2
    • Events
      • Unit - Blood Mage 0019 <gen> Acquires a target
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Animation - Play Blood Mage 0019 <gen>'s spell channel animation
      • Unit - Pause Blood Mage 0019 <gen>
      • Trigger - Run mass flamestrike <gen> (checking conditions)
      • Wait 2.00 seconds
      • Trigger - Run mass flamestrike <gen> (checking conditions)
      • Wait 2.00 seconds
      • Trigger - Run mass flamestrike <gen> (checking conditions)
      • Wait 2.00 seconds
      • Trigger - Run mass flamestrike <gen> (checking conditions)
      • Wait 2.00 seconds
      • Trigger - Run mass flamestrike <gen> (checking conditions)

I made it like this, is this right way?
 
Last edited:
Level 28
Joined
Feb 18, 2014
Messages
3,579
  • Init Flame Strike
    • Events
      • Player - Player 1 (Red) types a chat message containing test as An exact match
    • Conditions
    • Actions
      • Trigger - Turn on Flame Strike Loop <gen>
  • Flame Strike Loop
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set position = ((Position of Blood Mage 0000 <gen>) offset by (Random real number between 1.00 and 600.00) towards (Random angle) degrees)
      • Unit - Order Blood Mage 0000 <gen> to Human Blood Mage - Flame Strike position
      • Custom script: call RemoveLocation (udg_position)
"Random real number between 1.00 and 600.00" means a random point within 600 range of radius of the caster. Btw you are leaking a location in your trigger, you should remove it.
 
Level 7
Joined
Jul 4, 2007
Messages
249
Could also use a timer
  • Init Flame Strike
    • Events
      • Player - Player 1 (Red) types a chat message containing test as An exact match
    • Conditions
    • Actions
      • Trigger - Run Flame Strike Loop <gen> (ignoring conditions)
  • Flame Strike Loop
    • Events
      • Time - timer expires
    • Conditions
    • Actions
      • Set tempLoc = (Position of Blood Mage 0000 <gen>)
      • Set tempLoc2 = (tempLoc offset by (Random real number between 1.00 and 600.00) towards (Random angle) degrees)
      • Unit - Order Blood Mage 0000 <gen> to Human Blood Mage - Flame Strike tempLoc2
      • Custom script: call RemoveLocation (udg_tempLoc)
      • Custom script: call RemoveLocation (udg_tempLoc2)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • condition to continue
      • Then - Actions
        • Countdown Timer - Start timer as a One-shot timer that will expire in 2.00 seconds
      • Else - Actions
This way it casts immediately and every 2 seconds after until you stop it using a condition

It's still leaking, you need to set position of (Position of Blood Mage 0000 <gen>) too
 
Last edited:
Status
Not open for further replies.
Top