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

Upgrades

Status
Not open for further replies.
Level 22
Joined
Jul 25, 2009
Messages
3,091
Is there any way to make an upgrade unavailable after you purchase another.

For example purchase of X locks Y, and vice versa.

GUI has a function for max research level but it doesn't seem to work.

Here it is...


  • Tech Restrictions
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Chaos Shrine
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Researched tech-type) Equal to Mark of Nurgle
        • Then - Actions
          • Player - Set the max research level of Mark of Slaanesh to 0 for (Owner of (Triggering unit))
          • Player - Set the max research level of Mark of Tzeentch to 0 for (Owner of (Triggering unit))
          • Player - Set the max research level of Mark of Khorne to 0 for (Owner of (Triggering unit))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Researched tech-type) Equal to Mark of Khorne
            • Then - Actions
              • Player - Set the max research level of Mark of Slaanesh to 0 for (Owner of (Triggering unit))
              • Player - Set the max research level of Mark of Tzeentch to 0 for (Owner of (Triggering unit))
              • Player - Set the max research level of Mark of Nurgle to 0 for (Owner of (Triggering unit))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Researched tech-type) Equal to Mark of Tzeentch
                • Then - Actions
                  • Player - Set the max research level of Mark of Slaanesh to 0 for (Owner of (Triggering unit))
                  • Player - Set the max research level of Mark of Khorne to 0 for (Owner of (Triggering unit))
                  • Player - Set the max research level of Mark of Nurgle to 0 for (Owner of (Triggering unit))
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Researched tech-type) Equal to Mark of Slaanesh
                    • Then - Actions
                      • Player - Set the max research level of Mark of Tzeentch to 0 for (Owner of (Triggering unit))
                      • Player - Set the max research level of Mark of Khorne to 0 for (Owner of (Triggering unit))
                      • Player - Set the max research level of Mark of Nurgle to 0 for (Owner of (Triggering unit))
                    • Else - Actions
 
Last edited:
Level 6
Joined
Jun 10, 2012
Messages
240
Finishes an upgrade --> Finishes a research

You're right. He made it all correct except for the event.
Is there any way to make an upgrade unavailable after you purchase another.

For example purchase of X locks Y, and vice versa.

GUI has a function for max research level but it doesn't seem to work.

Here it is...


  • Tech Restrictions
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Chaos Shrine
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Researched tech-type) Equal to Mark of Nurgle
        • Then - Actions
          • Player - Set the max research level of Mark of Slaanesh to 0 for (Owner of (Triggering unit))
          • Player - Set the max research level of Mark of Tzeentch to 0 for (Owner of (Triggering unit))
          • Player - Set the max research level of Mark of Khorne to 0 for (Owner of (Triggering unit))
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Researched tech-type) Equal to Mark of Khorne
            • Then - Actions
              • Player - Set the max research level of Mark of Slaanesh to 0 for (Owner of (Triggering unit))
              • Player - Set the max research level of Mark of Tzeentch to 0 for (Owner of (Triggering unit))
              • Player - Set the max research level of Mark of Nurgle to 0 for (Owner of (Triggering unit))
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Researched tech-type) Equal to Mark of Tzeentch
                • Then - Actions
                  • Player - Set the max research level of Mark of Slaanesh to 0 for (Owner of (Triggering unit))
                  • Player - Set the max research level of Mark of Khorne to 0 for (Owner of (Triggering unit))
                  • Player - Set the max research level of Mark of Nurgle to 0 for (Owner of (Triggering unit))
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Researched tech-type) Equal to Mark of Slaanesh
                    • Then - Actions
                      • Player - Set the max research level of Mark of Tzeentch to 0 for (Owner of (Triggering unit))
                      • Player - Set the max research level of Mark of Khorne to 0 for (Owner of (Triggering unit))
                      • Player - Set the max research level of Mark of Nurgle to 0 for (Owner of (Triggering unit))
                    • Else - Actions
Good idea, You only had one mistake.
 
Level 22
Joined
Jul 25, 2009
Messages
3,091
It's different, I tested it.

By changing it to Research rather than Upgrade, will fire that event and action.

Just 1 more thing to optimize the trigger, use (Triggering player) instead (Owner of (Triggering unit)) which calls 2 functions instead 1.

Okay everything worked, but I can still queue the upgrades... When the other one is researching I mean, solution?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Create another trigger;
  • Cancel Research
    • Events
      • Unit - A unit Cancels research
    • Conditions
    • Actions
      • Player - Set the max research level of Research1 to 1 for (Triggering player)
      • Player - Set the max research level of Research2 to 1 for (Triggering player)
      • Player - Set the max research level of Research3 to 1 for (Triggering player)
      • Player - Set the max research level of Research4 to 1 for (Triggering player)
Change your first trigger from Finishes a research to Begins a research

So there's gonna be 2 triggers.

So when the unit Begins Research1, all other Research will be disabled, and when Research1 is Canceled, all other research is set back to enable to be researched.
 
Level 22
Joined
Jul 25, 2009
Messages
3,091
Create another trigger;
  • Cancel Research
    • Events
      • Unit - A unit Cancels research
    • Conditions
    • Actions
      • Player - Set the max research level of Research1 to 1 for (Triggering player)
      • Player - Set the max research level of Research2 to 1 for (Triggering player)
      • Player - Set the max research level of Research3 to 1 for (Triggering player)
      • Player - Set the max research level of Research4 to 1 for (Triggering player)
Change your trigger from Finishes an upgrade to Begins an upgrade

So there's gonna be 2 triggers.

Thanks.
 
Status
Not open for further replies.
Top