• 🏆 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!

Control of a building

Status
Not open for further replies.
  • Building Control
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A structure) Equal to True
    • Actions
      • Set TempPoint = (Position of (Dying unit))
      • Set TempPlayer = (Owner of (Killing unit))
      • Set TempType = (Unit-type of (Dying unit))
      • Unit - Create 1 TempType for TempPlayer at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
TempPoint is a point variable
TempPlayer is a player variable
TempType is a unit type variable
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Tropy, instead of re-creating a structure over and over again, it's better just to use the same building, by altering its max HP, to full.

Use a Damage Detection System for this and detect if damage > current HP, change the owner.
 
Status
Not open for further replies.
Top