Would this work? Move unit Trigger

Firezy

New Member
Reaction score
14
The problem with testing this is that I can't host, and nobody on my /f l can host either sadly :thdown::thdown:

What I was hoping to do was make it so that when the boss dies (in this case, unit_iceg0) that every unit gets moved to its own loot room

So since I can't test it I'm hoping if someone can eyeball it and tell me if this will work or not

Trigger:
  • Loot Area
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Dying unit) Equal to unit_iceg0
    • Actions
      • Set unitgroup_iceg = (Units in Ice Gauntlet <gen> matching ((((Matching unit) belongs to an enemy of player_hostile) Equal to True) and (((Matching unit) is A Hero) Equal to True)))
      • Set point_iceg3 = (Center of region_loot[(Player number of (Owner of (Picked unit)))])
      • Unit Group - Pick every unit in unitgroup_iceg and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to point_iceg3
      • Custom script: call DestroyGroup (udg_unitgroup_iceg)
      • Custom script: call RemoveLocation (udg_point_iceg3)
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> forgot to move that inside unit group

You probably want to move the RemoveLocation there too.

On a related note, if that were a point array instead of a region array, there wouldn't be anything that needed removal.


Other than that, it just depends on the contents of unit_iceg0 and player_hostile.
If those are correct, it has a chance to work.
 

Firezy

New Member
Reaction score
14
unit_iceg0 = last created unit in regards to
Code:
Unit - Create 1 |cCFFF0202Frigid Overlord |n*Boss* for player_hostile at point_iceg2 facing Default building facing degrees

and playerhostile is just player12 which in my map is the default enemy units
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top