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

Upgrade Building > refer to upgraded building

Status
Not open for further replies.
Level 5
Joined
May 12, 2008
Messages
80
Hey guys,
when i upgrade a building, how do i create a trigger condition that checks the resutling structure? The "constructing structure" event reaction doesnt work for me, it refers to the not upgraded structure.

( Problem is: For certain purposes human players on my melee map shall have other trees of live than ai players. therefore i use an upgrade that is started via trigger when the game starts and transforms the ai tree of live (starting unit) to a human tree of live. I dont want to set the construction time to 1 sec. because repairing the human players tree of live would go super fast (by the way: it just looks odd when the first thing you see happening on your screen is an upgrading structure...). Thats why i want to set the upgrading process to 100% per trigger. The "constructing structure" event reaction however refers to the building that will get upgraded (tree of live for ai), not the resulting building (tree of live for human). If i use that as a condition the upgrade to tree of ages would go in no time for the ai... )
 
Level 5
Joined
May 12, 2008
Messages
80
What i want to achieve is an instant upgrade of my tree of live (ai) to a tree of live (human) by setting the construction process to 100%. This way i dont have to wait when upgrading but have a long repair time.
When i use the "finished construction event" i have to wait until the construction is finished (which takes way too long) and therefore i wont need the triggers anymore.
 
Level 5
Joined
May 12, 2008
Messages
80
Thats not my problem. I need a condition that refers to finished building when i use the begins construction event. Triggering unit, constructing structure and constructed structure dont work. They either dont trigger anything or refer to the initial building.
(sry for limited english knowledge. makes it hard for me to make really precise questions :D )
 
Level 5
Joined
May 12, 2008
Messages
80
In detail:
My map is a melee map. Therefore all starting units including a unit called "Tree of Life" are created by the standard triggers:
  • Melee Initialization
    • Ereignisse
      • Map initialization
    • Bedingungen
    • Aktionen
      • Nahkampf-Spiel - Use melee time of day (for all players)
      • Nahkampf-Spiel - Limit Heroes to 1 per Hero-type (for all players)
      • Nahkampf-Spiel - Give trained Heroes a Scroll of Town Portal (for all players)
      • Nahkampf-Spiel - Set starting resources (for all players)
      • Nahkampf-Spiel - Remove creeps and critters from used start locations (for all players)
      • Nahkampf-Spiel - Create starting units (for all players)
      • Nahkampf-Spiel - Enforce victory/defeat conditions (for all players)
      • Nahkampf-Spiel - Run melee AI scripts (for computer players)
Now every human player gets a modified "Tree of Life (for Humans)"
  • Initialisierung human players
    • Ereignisse
      • Zeit - Elapsed game time is 0.01 seconds
    • Bedingungen
    • Aktionen
      • Spielergruppe - Pick every player in (All players matching ((((Matching player) controller) Gleich Benutzer) and (((Matching player) slot status) Gleich Spielt))) and do (Actions)
        • Schleifen - Aktionen
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Bedingungen
              • (Race of (Picked player)) Gleich Nachtelf
            • 'THEN'-Aktionen
              • Einheitengruppe - Pick every unit in (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Gleich Tree of Life) and ((Owner of (Matching unit)) Gleich (Picked player)))) and do (Actions)
                • Schleifen - Aktionen
                  • Einheit - Order (Picked unit) to train/upgrade to a Tree of Life (for Humans)
              • ELSE'-Aktionen
Problem is: Upgrading to "Baum des Lebens (Upgrade für Spieler) takes 150 seconds because i want it to have the same repair time as "Tree of Life". This is why i want to set the upgrading proces to 100% when it starts upgrading.
  • Ausbau Hauptgebaeude
    • Ereignisse
      • Einheit - A unit triggers an event
    • Bedingungen
      • (Unit-type of (Triggering unit)) Gleich Tree of Life (for Humans)
    • Aktionen
      • Einheit - Set (Triggering unit) upgrade progress to 100%
You all know that a Tree of Life can be upgraded to Tree of Ages (or whatever tier2 is called). So this
  • Ausbau Hauptgebaeude
    • Ereignisse
      • Einheit - A unit Beginnt einen Ausbau
    • Bedingungen
      • (Unit-type of (Constructing Structure)) Gleich Tree of Life
    • Aktionen
      • Einheit - Set (Constructing Structure) upgrade progress to 100%
is no solution for my problem because it will make my Tree of Ages upgrade finish instantly as well.

Hope you understand my problem. BTW if you can tell me how to hide those triggers (like jonhysone, he hid his post somehow) i will do that. makes this post so incredibly large...
 
Last edited:
Level 5
Joined
May 12, 2008
Messages
80
...Tree of Ages(for human) <-upg- Tree of Life(for human) <-upg- Tree of Life -upg-> Tree of Ages...

How can i detect, wether my Tree of Life starts upgrading to Tree of Ages or Tree of Life(for human)?

PLEASE post a trigger which shows exactly which conditions you took to solve the problem. I already tried what came to my mind and it didnt work at all and i dont get what your suggestion is.

@deathismyfriend: i'd be glad if i could upload triggers in english. What you see is copied n pasted from WE. Blizzard didnt translate everything, they messed up somehow and only did half of the work. if i try translating it myself the syntax may not be correct and thats crap as well.
 
Status
Not open for further replies.
Top