• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

This may or may not work-obs on defeat

Status
Not open for further replies.
So I'm just going to share this and ask if it works.

  • heroes defeat
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((((Triggering unit) is A Hero) Equal to True) and ((Owner of (Triggering unit)) Equal to Player 1 (Red))) or ((((Triggering unit) is A Hero) Equal to True) and (((Triggering unit) belongs to an ally of Player 1 (Red)) Equal to True))
    • Actions
      • Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit))) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Make (Owner of (Dying unit)) treat (Picked player) as an Ally with shared vision
          • Player - Make (Picked player) treat (Owner of (Dying unit)) as an Ally with shared vision
Is this gonna work cause it doesn't in test mode.
 
  • Custom script: set bj_wantDestroyGroup = true
This destroys the group that is used below, immeditely. In this case you don't need to use any group veriable.

Otherwise, most of peoples recommend not use this, because I think it causes memory leaks/errors

Using a group veriable will be cleared like this:
  • Custom script: call DestroyGroup (udg_GroupName)
As for player problem, just use multiple conditions.
 
Status
Not open for further replies.
Back
Top