• 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.

How do you make all of a players buildings disappear.

Status
Not open for further replies.
Level 3
Joined
Jun 28, 2018
Messages
36
Hi, I just need to know how to write a trigger that will make all of
a players buildings disappear when the player is defeated so that
the remaining players can keep playing without seeing the defeated
players buildings, they can explode or just disappear or whatever works,
any help would be cool thanks.
 
Last edited:

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
2,011
That link doesn't seem to solve anything in a proper way.
According to my tests, a unit will go in a straight line without "curving" (I really don't call that curving, rather a path deviation, but whatever) within a max distance of 1504.03 (using the grid, its length is 3 yellow squares) Tested with regions.
There are 2 solutions:
1. Either have an intermediate region, order the unit to go there, and have another trigger with an event "unit enters that region" and move on to the destination.
2.
  • Untitled Trigger 003
    • Events
      • Unit - A unit enters LeftCorner <gen>
    • Conditions
    • Actions
      • Unit - Order (Triggering unit) to Move To ((Position of (Triggering unit)) offset by 900.00 towards 270.00 degrees)
      • Wait 5.00 seconds
      • Unit - Order (Triggering unit) to Move To ((Position of (Triggering unit)) offset by 900.00 towards 270.00 degrees)
Both seem kind of stupid but they're the most viable ways I know, I'd prefer the second one so you don't need to create extra regions.
Obviously you'll have to change some values like the wait or the distance to your convenience.
 
Last edited:
Level 45
Joined
Feb 27, 2007
Messages
5,578
If it's a TD with a set path for creeps that you can't maze around (to change the path) (for example if your TD is like Element TD), moving them with SetUnitX/Y and playing the walk animation is also a viable solution. More complex than using multiple waypoint regions as Wrda suggests, certainly, but having complete control over how they move might be beneficial.
 
Status
Not open for further replies.
Top