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

One Item Occurance Per Queue

Status
Not open for further replies.
Level 10
Joined
Feb 7, 2005
Messages
409
hey guys, I want to make a building with a bunch of upgrades available, some of these upgrades have multiple levels. I want to make it so that you can't queue two of the same upgrade, and here's why.

I made an upgrade that increases unit attack damage by 1 and costs 10 minerals

in the events of that upgrade, it also increases the resource cost of itself by 10 minerals upon completion of the research

The bug is that, if you queue the research 5 times when it costs 10 minerals, you get 5 upgrades for the cost of 10 minerals each. Instead of the wanted 10 minerals for the first, 20 for the second, so on and so forth.

so I'm looking for a way for the game to apply the additional resource cost upon queuing the same research twice, or a way to make it so you cant queue the same research twice.
 
Level 1
Joined
Feb 24, 2010
Messages
62
Make a new requirement (you need to make one for each upgrade).

Call it something like 'NotUpgrade<Name of upgrade>', and then go to the field 'Requirement +'. There, right-click on the folder 'Use' and add a new requirement node and change that node's type to 'Not'. Right click on the just added node and add another node. Change that node's type to 'Count Upgrade'.
Then the 'Alias' should be the alias of your upgrade, and lastly change the 'State' to 'Queued', so you can't use the upgrade when ANY unit under your control is researching it.
Add the requirement to your upgrade, and you should be done!

EDIT: This makes the upgrade only queue once, have no clue how to make it twice or so. :3
 
Level 10
Joined
Feb 7, 2005
Messages
409
Almost perfect! The only problem is that I can still queue a second upgrade for the same price as one being researched, but I can't queue any more after that. I'll just add a requirement that counts currently researching ones as well.

Thanks a lot!
 
Status
Not open for further replies.
Top