• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Respawned buildings Change Location

Status
Not open for further replies.
Level 14
Joined
Dec 28, 2012
Messages
379
So Basically i triggered is to that when a building dies it gets respawned and changed owner to killing units but some building suddenly respawn not where they died this only happens to certain buildings


Heres map http://www.hiveworkshop.com/forums/pastebin.php?id=76lr9w
Pick Blue and Attack Pinks Base

Here are Triggers

  • CP Respawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Town
          • (Unit-type of (Triggering unit)) Equal to City
          • (Unit-type of (Triggering unit)) Equal to Capital
          • (Unit-type of (Triggering unit)) Equal to Barracks
          • (Unit-type of (Triggering unit)) Equal to Church
          • (Unit-type of (Triggering unit)) Equal to Weaponry & Armory
          • (Unit-type of (Triggering unit)) Equal to Guard Tower
    • Actions
      • Unit - Replace (Triggering unit) with a (Unit-type of (Triggering unit)) using The new unit's default life and mana
      • Unit - Change ownership of (Last replaced unit) to (Owner of (Killing unit)) and Change color
 
Last edited:
Level 8
Joined
Oct 12, 2011
Messages
483
That specific town (the one right on the coast) seems a tad too close to the water, so the editor recognizes it as pathable for the building, but when it gets replaced it gets moved. I simply raised the underwater terrain above water, and it fixed the problem.
 
Level 8
Joined
Oct 12, 2011
Messages
483
On a closer inspection, I found my previous post is false. The problem occurs because of some of the buildings' pathing maps. Because a building cannot be placed on top of a unit, even though a unit can walk on the unbuildable but walkable portion of the pathing map, if a unit is there when the building gets replaced, the building cannot be put on top of the unit and is forced to move.

There are a couple solutions, the one that will probably work the best is changing all of the pathing maps so that they don't have a border that is walkable but unbuildable. Another possible solution is changing the ownership/healing to full health when the building's life gets below a certain percent. However, this is vulnerable to the building getting one shot from above the percentage to 0, and the trigger not firing.
 
Level 14
Joined
Dec 28, 2012
Messages
379
On a closer inspection, I found my previous post is false. The problem occurs because of some of the buildings' pathing maps. Because a building cannot be placed on top of a unit, even though a unit can walk on the unbuildable but walkable portion of the pathing map, if a unit is there when the building gets replaced, the building cannot be put on top of the unit and is forced to move.

There are a couple solutions, the one that will probably work the best is changing all of the pathing maps so that they don't have a border that is walkable but unbuildable. Another possible solution is changing the ownership/healing to full health when the building's life gets below a certain percent. However, this is vulnerable to the building getting one shot from above the percentage to 0, and the trigger not firing.


Can you fix that bug for me plz XD
http://www.hiveworkshop.com/forums/pastebin.php?id=zpf991
 
Level 12
Joined
Oct 16, 2010
Messages
680
  • Set TempPoint = killing unit pos
  • Unit - move ( killing unit) to somerandompoint
  • Unit - Replace (Triggering unit) with a (Unit-type of (Triggering unit)) using The new unit's default life and mana
  • Unit - Change ownership of (Last replaced unit) to (Owner of (Killing unit)) and Change color
  • Unit - move killing unit instantly to TempPoint
EDIT: mind this only applies to the killer not the rest of the attackers if there are any:/
 
Last edited:
Level 14
Joined
Dec 28, 2012
Messages
379
On a closer inspection, I found my previous post is false. The problem occurs because of some of the buildings' pathing maps. Because a building cannot be placed on top of a unit, even though a unit can walk on the unbuildable but walkable portion of the pathing map, if a unit is there when the building gets replaced, the building cannot be put on top of the unit and is forced to move.

There are a couple solutions, the one that will probably work the best is changing all of the pathing maps so that they don't have a border that is walkable but unbuildable. Another possible solution is changing the ownership/healing to full health when the building's life gets below a certain percent. However, this is vulnerable to the building getting one shot from above the percentage to 0, and the trigger not firing.


So i Managed to Change pathing of most building and this problem doesnot accuare anymore thanks allot
 
Status
Not open for further replies.
Top