Check unit in region?

streng

Member
Reaction score
1
Hi guys.
I trying to implement new pvp system to my map.
My system make all players as enemy every 10 minute of game an move heroes instantly to specific region.
This part work fine, but what i want : When only last unit(hero) in specific region is alive move allive unit to another region, revive dying unit instantly, make all players as ally etc. But i dont know how event and condition i can used for this ?
And how to prevent that system can count summons and other unit to. I want to occur triger only when last hero is allive, is not important if enemies sumons are allive.
Any ideas ?
 

Juggernaut

I don't know what to change it to
Reaction score
33
to count only heroes do:
set <unit group variable> = units in <your region> matching <matching unit> is a hero
unit group - pick every unit in <group>
if/then/else
Integer comparison: number of units in <group> equal to 1
unit move picked unit to another region

for reviving the dead units, you could save every dead hero in a unit variable with array.
Then using a for function you revive all of them.
Need examples?

Note: Code was not copied from wc3, i wrote by myself. Could have some mistakes
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top