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

[Trigger] Help with Issue Order and Unit Groups

Status
Not open for further replies.
Level 2
Joined
Jan 27, 2023
Messages
3
So I've stuck on this trigger for hours now and can't really tell what is going on. The idea is simple, every few seconds the boss calls down a "broadside" on the arena; players are warned where it's going to fall so they have time to move out of the way. Simple enough.
  • BroadsideSpawn
    • Events
      • Time - BroadsideTimer expires
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 14, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy Alert for Player 12 (Brown) at (Random point in ARENA <gen>) facing Default building facing degrees
          • Unit Group - Add (Last created unit) to BroadsideDummy_Group
      • Countdown Timer - Start BroadsideFuse as a One-shot timer that will expire in 2.00 seconds
So, the timer expires and this happens. Dummy Alert is literally the Dummy unit I've used for every single spell and mechanic so far with no issues, only that it uses the Exclamation Mark model to make it easier to see (And so I don't have to needlessly fiddle with Special Effects)

  • BroadsideBoom
    • Events
      • Time - BroadsideFuse expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in BroadsideDummy_Group and do (Actions)
        • Loop - Actions
          • Unit - Add Broadside to (Picked unit)
          • Unit - Order (Picked unit) to Orc Tauren Chieftain - War Stomp.
          • Unit - Add a 1.50 second Generic expiration timer to (Picked unit)
          • Game - Display to (All players) the text: (Name of (Picked unit))
Then this! Exceeeept, it doesn't work. I do get the Message displayed, so it is picking the units correctly. But it isn't casting the spell or issuing the order. I tried with different spells, no luck. Even baseline creep spells, like Slam or Shockwave, but the Dummies do nothing. As I said, they have mana and everything else needed to cast it, I've been using them for like a hundred triggers already. I tried using just regular dummies but the result is the same. I get the message and they do expire, they just refuse to cast. Is there something obvious I'm doing wrong? I'd feel like pulling my hair if I wasn't bald already.
Thanks for the help!

(Btw, I know this leaks, I'm more interested in having it work first, fix leaks later)
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
You could rid yourself the need of the fuse Timer/Unit Group if you put a 2.00 second Casting Time on the War Stomp ability.
  • BroadsideSpawn
    • Events
      • Time - BroadsideTimer expires
    • Conditions
    • Actions
      • For each (BroadsideLoop) from 1 to 14, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Dummy Alert for Player 12 (Brown) at (Random point in ARENA <gen>) facing Default building facing degrees
          • Set Variable Dummy = (Last created unit)
          • Unit - Add a 2.25 second Generic expiration timer to Dummy
          • Unit - Add Broadside to Dummy
          • Unit - Order Dummy to Orc Tauren Chieftain - War Stomp.
Try using more variables to confirm that it's not a weird Event Response issue. Also, in rare cases a variable can get "unset" where it appears to be in working order inside of your triggers but in reality the Variable Type is actually blank. This will cause anything that references that variable to stop working until you reapply it's type.
 
Last edited:
Level 2
Joined
Jan 27, 2023
Messages
3
Well! Thanks everyone for their answers!

I have solved it, and the solution was not what I expected!

I began by confirming the unit could cast it. It could; but it doesn't show any art. I tried with a generic unit and it casted fine and displayed the art correctly. I suppose that Stomp like abilities use feet as attachment and the Exclamation Mark has none, I tested it with the Shopping arrow model too and the result was the same. I can still trigger the art as special effect so, annoying but workable.

However, I knew the ability wasn't firing before, since I took no damage nor was stunned when testing the trigger; so that was a neat discovery but not exactly a solution. I decided to remake everything, dummy, skill, unit group and trigger, from scratch. Same result.

Well, when nothing makes sense, then we start checking for things that don't make sense. And by messing around, I discovered that removing the Expiration Timer seemed to solve the issue. I made it longer. Way longer. Nope, stopped working again.
So I decided to move it from the "Pick every unit..." function into the "For Each..." and... it now works flawlessly.

Something tells me I'm not the first person to have tried setting an expiration timer in a unit group. I have probably already done so in other triggers in this same map! I have no idea why or how, what combination of factors has lead to this, and while I'm glad it's fixed, I have no explanation as to why it wasn't working. More science is required, but I'm not of a mind keen enough to figure out the correct experiments.
 
Status
Not open for further replies.
Top