How to remove a persons unit whose not playing

educator

New Member
Reaction score
9
i use tft editor but it should be the same
events
a player is defeated
conditions
-
actions
pick every unit in (entire map) owned by (triggering player) and do actions
-loop actions
remove (picked unit)
i dont know if you can remove memory leaks in RoC or if the events are the same(or if i got it right)
 

Igor_Z

You can change this now in User CP.
Reaction score
61
These triggers are more efficient when it comes to all players doing something... There is another positive side. The event "Picked player leaves the game" occurs regardless of how the player left the game.

Triggers:

Trigger:
  • Pick Players
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set PickPlayers_Group = (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing)))
      • Player Group - Pick every player in PickPlayers_Group and do (Actions)
        • Loop - Actions
          • Trigger - Add to Remove Unit from leaver <gen> the event (Player - (Picked player) leaves the game)
      • Custom script: call DestroyForce(udg_PickPlayers_Group)
      • Custom script: call DestroyTrigger(gg_trg_Pick_Players)


Trigger:
  • Remove Unit from leaver
    • Events
    • Conditions
    • Actions
      • Set RemoveUnit_Group = (Units in (Playable map area) owned by (Triggering player))
      • Unit Group - Pick every unit in RemoveUnit_Group and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
      • Custom script: call DestroyGroup(udg_RemoveUnit_Group)


P.S: I destroy the trigger because it is not needed anymore and it shouldn't occupy more space in your map...
 
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