Pick Random Unit from Unit Group not working properly.

Razed

New Member
Reaction score
44
Hi there,

I got these actions running. They are for a boss fight.

Trigger:
  • Actions
    • Set Temp_Point = (Position of Bosses[0])
    • Unit - Create 1 Dummi H for (Owner of Bosses[0]) at Temp_Point facing Default building facing degrees
    • Unit - Add Boss_Scarvish_DeathCoil_Dummy to (Last created unit)
    • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
    • Set Temp_Unit_Group = (Units in Scarvish Reset Region <gen> matching (((Owner of (Matching unit)) Not equal to Player 12 (Brown)) and (((Matching unit) is alive) Equal to True)))
    • Unit - Order (Last created unit) to Undead Death Knight - Death Coil (Random unit from Temp_Unit_Group)
    • Custom script: call DestroyGroup (udg_Temp_Unit_Group)


This is just a fragment of my trigger, this part repeats itself every 0.50 seconds of game time. This trigger works like intended when all the units (hero units) are alive during the boss fight. But as soon as one hero dies (or more) it seems like they are still added to the "Temp_Unit_Group" although they visually seem dead (see the required matching). Does "(((Matching unit) is alive) Equal to True)" even work for hero units? Because as far as I know hero units don't decay and perhaps they won't appear as dead to the trigger.

I hope somebody has an answer to my problem.

Thanks.

PS. Example:
One hero remains in the boss fight and the boss begins to execute the above move.
Intention: The one alive hero is supposed to get hit 6 times by a Death Coil, being the only one left in the Unit Group.
Reality: The one alive hero gets hit perhaps 1 or 2 times, sometimes even 0 times. Probably because the dummy wants to cast Death Coil on an already dead target.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
You could just use another unit group variable for LivingHeroes, and remove heroes from it when they die.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top