• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Upgrading a building

Status
Not open for further replies.
Level 3
Joined
Jul 25, 2007
Messages
37
Hopefully the answers to my last question solve that problem. Thanks to everybody who replied!

Second question: I have a custom building that sells items; it also has the "Return Gold and Lumber" ability. This upgrades to a different custom building, focused on unit production; it's not supposed to have items or "Return". I used Techtree -- Upgrades To in the Unit Editor.

When I place either Custom #1 or Custom #2 on the map directly, they work just as intended. When I upgrade Custom #1 to Custom #2, fail ensues. For lo and behold, it retains the items and "Return" ability...and shoves off a few of Custom #2's trained units to fit them into its menu.

What am I doing wrong? Is there an upgrade ability that I need to include too?
 
do this:
  • Events
    • Unit - A unit finishes construction
  • Conditions
    • Unit Type - Unit-Type of (Constructed Structure) is Equal to Custom unit 2
  • Actions
    • Unit - Remove (Constructed Structure) from the game
    • Unit - Create 1 (Unit-Type of (Constructed Structure)) at (Position of (Constructed Structure)) for (Owner of (Constructed Structure)) Facing Default Building Degrees
 
I'll keep it in mind, but I'd really prefer using triggers as a last resort. I'm not very experienced with them, and they tend to make my maps lag. Incidentally, I tried using a tweaked version of "Berserker Upgrade"...that didn't help either.
 
Triggers may cause lag due to leaks,remember to remove the point leak here if you're going to use triggers

  • Upgrading a building
    • Events
      • Unit - A unit finishes construction
    • Conditions
      • Unit Type - Unit-Type of (Constructed Structure) is Equal to Custom unit 2
    • Actions
      • Unit - Remove (Constructed Structure) from the game
      • Set TempPoint = (Position of (Constructed structure))
      • Unit - Create 1 (Unit-Type of (Constructed Structure)) at (TempPoint) for (Owner of (Constructed Structure)) (Facing of (Constructed structure)) degrees
      • Custom script: call RemoveLocation(udg_TempPoint)
 
Status
Not open for further replies.
Back
Top