• 🏆 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] Need help with a unit trigger

Status
Not open for further replies.
Level 2
Joined
Apr 13, 2007
Messages
17
So im making a boss map just to get new ideas for triggering and such, and i'm spawning alot of meat wagons to attack a large part of the area where the boss fight takes place so the players have to run to the sides. Now the problem is between these attacks that i order the meat wagons target the heroes/units outside the area they should be targeting, the meat wagons have 9000 range, and cooldown on their attack speed is 0.30.

Here are the 4 triggers i use for it all (yes it could have been done easier but i had done some of them when i realised that i could have done it easier):

  • Meat Wagon Attack Warning
    • Events
      • Time - Elapsed game time is 170.00 seconds
    • Conditions
      • (Boss1 is alive) Equal to True
    • Actions
      • Game - Display to (All players) the text: Gruk: My bloodbarra...
      • Wait 10.00 seconds
      • Countdown Timer - Create a timer window for (Create a periodic One-shot timer lasting 30.00) with title Blood Barrage ends ...
      • Set BloodBarrageTimer = (Last started timer)

  • Meat Wagon Attack
    • Events
      • Time - Elapsed game time is 180.00 seconds
    • Conditions
    • Actions
      • Unit - Create 36 Meat Wagon for Player 12 (Brown) at (Center of Rect 006 <gen>) facing (Center of Boss 1 Fight <gen>)
      • Unit Group - Add all units of (Last created unit group) to MeatWagonBoss1
      • Trigger - Turn on Meat Wagon Attack Effect <gen>
  • Meat Wagon Attack Effect
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
      • (Boss1 is alive) Equal to True
    • Actions
      • Unit - Order (Random unit from MeatWagonBoss1) to Attack Ground (Random point in Boss 1 Fight <gen>)
  • Meat Wagon Attack Stop
    • Events
      • Time - BloodBarrageTimer expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in MeatWagonBoss1 and do (Unit - Remove (Picked unit) from the game)
So the question is how do i make sure that the meat wagons dont attack anything else than the attack ground they've been ordered? Also how do i refer to the correct timer in trigger 3 so i can properly set the variable BloodBarrageTimer? And no it isn't supposed to be MUI, so i just used the wait :p

EDIT: Now the trigger is right.
 
Last edited:
Level 5
Joined
May 21, 2006
Messages
174
You could use the "Order Unit ... Targeting a Point", and use Attack Ground.
Then they'll just attack the spot you've selected no matter what.

Edit: And btw, the 3 first triggers are identical. And use
  • instead of [code]. ;)
 
Last edited:
Level 2
Joined
Apr 13, 2007
Messages
17
I think you'll be able to help out better if i fix it, because i have them targeting a random point in a certain region... it worked earlier when i had them targeting a specific point but now when it applies a random unit of the meatwagons to attack a random point some of them attack my hero. Is that because they dont get assigned?

Do i have to order them all to do nothing at first? so the ones that don't get picked out don't shoot before they getp icked to target a random point.
 
Level 2
Joined
Apr 13, 2007
Messages
17
Read Trigger 2:

Create 36 Meat Wagon for Player 12 (Brown) at (Center of Rect 006 <gen>) facing (Center of Boss 1 Fight <gen>)

And its not the whole map its the region "Boss 1 Fight".
 
Status
Not open for further replies.
Top