• 🏆 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!

[Trigger] Dead Units In Groups

Status
Not open for further replies.
Level 3
Joined
Sep 10, 2012
Messages
39
Forgive me if there is already a thread related to this subject, but I wanted to know if there was a way to add dead units to unit groups. My previous attempt used the following trigger.

  • Corpse Explosion PreCast Targets
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to (Alev) Corpse Explosion
    • Actions
      • Unit Group - Pick every unit in (Random 1 units from (Units within 500.00 of CETargetLoc matching ((((Matching unit) is alive) Equal to False) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Mechanical) Equal to False))))) and do (Actions)
        • Loop - Actions
          • Unit Group - Add (Picked unit) to CETargets
      • Trigger - Run Corpse Explosion PreCast Condition <gen> (ignoring conditions)
However, the unit group remains empty. Fixable?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Also I believe there are more conditions to the right, we don't know the full condition for the Matching unit, please post all of it (I mean not direct copy, but you know the drill, edit it so we can see full conditions).

Also, you used that Event-response "Unit begins casting an ability" which pretty not accurate, you should use "Unit starts the effect of an ability.
 
Level 3
Joined
Sep 10, 2012
Messages
39
Also I believe there are more conditions to the right, we don't know the full condition for the Matching unit, please post all of it (I mean not direct copy, but you know the drill, edit it so we can see full conditions).

Also, you used that Event-response "Unit begins casting an ability" which pretty not accurate, you should use "Unit starts the effect of an ability.

No, that's the full list of conditions, all that's left is the "and do Actions," which you can view by using the scrollbar.


"Where is CETargetLoc set?"

Hmm. That's...a really good question, actually. It was supposed to be set a the target point of ability being cast, but it would seem I forgot to do that...
Well, now that I feel appropriately stupid, I shall attempt this fix at some point, and see if it works.
By the way, it's set to 'begins casting' because I want it to stop the cast if the unit group does not contain a unit by the time the effect starts.
 
Status
Not open for further replies.
Top