• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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:
Level 39
Joined
Feb 27, 2007
Messages
5,054
They're either too close together (increase time between spawning each unit) or the pathing map is messing with their ability to move in straight lines. Press P to see pathing on the ground in the editor; purple is areas units can't walk.
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,905
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 39
Joined
Feb 27, 2007
Messages
5,054
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