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

[Trigger] Can some one help me?

Status
Not open for further replies.
Level 4
Joined
Nov 28, 2007
Messages
107
I need a trigger that makes a Building transforn into a nother building only if the score board shows that the guy that is upgrating the building has more then 250 points. (upgrating the building it is a research!)
and then that upgreated building can upgrade one more time to lvl 2 with a lvl 2 reaserch. but the guy needs to have 500 points for that to happen. can any one help me? :confused:
 
I need a trigger that makes a Building transforn into a nother building only if the score board shows that the guy that is upgrating the building has more then 250 points. (upgrating the building it is a research!)
and then that upgreated building can upgrade one more time to lvl 2 with a lvl 2 reaserch. but the guy needs to have 500 points for that to happen. can any one help me? :confused:
Something like
  • Events
    • Every 2 seconds of game time
  • Conditions
  • Actions
    • Loop (ForLoopIndexA 1 to number of players)
      • If (score_variable[ForLoopIndexA] >= 250 && teir_variable[ForLoopIndexA] == 1)
      • then
        • Unit - Replace (Triggering unit) with a Footman using The old unit's relative life and mana
        • set teir_variable[ForLoopIndexA] == 2
      • else
 
tx but i think that only works if you have only one option.... i need it to b able to transform into 2 diffrent buildings like lvl 1 "good" or lvl 1 "bad" and if you picked bad it can upgrade to lvl 2 "bad" and if you are lvl 1 "good" you can upgrade to lvl 2 "good" :(
 
Save what the player picked to a variable, and add a branch to the trigger so it changes to whatever building based on the players choice.

Eg:

  • Events
    • Every 2 seconds of game time
  • Conditions
  • Actions
    • Loop (ForLoopIndexA 1 to number of players)
      • If (score_variable[ForLoopIndexA] >= 250 && teir_variable[ForLoopIndexA] == 1)
      • then
        • If (build_path[ForLoopIndexA] == 'bad')
        • then
          • Unit - Replace (Old building) with a (Teir 2 bad building) using The old unit's relative life and mana
        • else
          • Unit - Replace (Old building) with a (Teir 2 good building) using The old unit's relative life and mana
        • set teir_variable[ForLoopIndexA] == 2
      • else
 
Meh, I'd go for something else. The upgrading of the basic building needs to be done seperately. I'm supposing that the unit that needs to be upgraded is doing the research itself.

  • Events
    • Unit - A unit starts researching
  • Conditions
    • (Researched tech type) equal to Upgrade Building
  • Actions
    • If (All conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Number of Points for (Owner of (Triggering Unit))) greater than or equal to (250.00 X ((Level of Upgrade Building) + 1))
      • Then - Actions
        • Player - Set level of Upgrade Building for (Owner of (Triggering Unit)) to ((Current level of Upgrade Building for (Owner of (Triggering Unit))) + 1)
        • If (All conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Or - Any (Conditions) are True
              • (Unit-type of (Triggering Unit)) equal to Good Lvl 1
              • (Unit-type of (Triggering Unit)) equal to Good Lvl 2
              • ...
          • Then - Actions
            • Unit - Replace (Triggering Unit) with a (Unit-type(Good Lvl + (Level of Upgrade Building for (Owner of (Triggering Unit))))) using the old unit's relative life and mana
          • Else - Actions
            • Unit - Replace (Triggering Unit) with a (Unit-type(Bad Lvl + (Level of Upgrade Building for (Owner of (Triggering Unit))))) using the old unit's relative life and mana
      • Else - Actions
        • Unit - Replace (Triggering Unit) with (Unit-type of (Triggering Unit)) using the old unit's relative life and mana
        • Game - Display to Player Group(Owner of (Triggering Unit)) the text: Not enough points!
 
Status
Not open for further replies.
Back
Top