• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Unit Availability Switching

Status
Not open for further replies.
Level 3
Joined
Jan 3, 2011
Messages
19
I'm making an altered melee map and I was trying to figure out how to have an upgrade that changes a buildings production of Demolishers to a custom unit, without changing the demolishers, Then having another upgrade become available that changes it back.

The upgrades switch back and forth, so you can build one then the other as many times as you want.
 
Level 6
Joined
Dec 9, 2010
Messages
121
I'm fairly sure the Trigger in GUI that you're looking for is under the Player actions.

I think it's called something like: "Player - Set Availability of Unit Type."

Basically, on Map Init, disable availability of the second type of unit. Then, you use this action when the player completes the specific research, and you can switch the units in a building back and forth. Make sure to make both units available for training in the structure, and have both units use the same X, Y coordinates for their icon, so the transition doesn't look sloppy.

I can go into more detail later, and post screenshots too, if you don't know what I'm talking about.
 
Level 10
Joined
May 7, 2006
Messages
180
Unit 1 - has ability chaos (unit2)
Unit 2 - has ability chaos (unit1)
Research unit 2 enables chaos (unit2)
Research unit 1 enables chaos (unit1)

Trigger so when research unit 2 is done research unit 1 is removed.
Likewise trigger so when research unit 1 is done, research unit 2 is removed.

This way when you research unit 2. chaos (unit2) is enabled, so all unit 1 is turned to unit 2. Then research unit 1 again, chaos (unit1) is enabled, so all unit 2 are turned to unit 1, the trigger disabled chaos (unit 2) so the units stay as they are unit the research is made again.

I hope this works. I've spelt unit so many times it doesnt even look like a word anymore :s

EDIT:
If you can't get it to work I might have a go at it tomorrow. No promises though, it will be better if you can get it to work for yourself :)
 
Level 3
Joined
Jan 3, 2011
Messages
19
This way when you research unit 2. chaos (unit2) is enabled, so all unit 1 is turned to unit 2.

Sounds like it would work but the point is so the ones you've already trained aren't changed, just the ones you will train are changed. Thanks though
 
Level 3
Joined
Jan 3, 2011
Messages
19
I'm fairly sure the Trigger in GUI that you're looking for is under the Player actions.

I think it's called something like: "Player - Set Availability of Unit Type."

Basically, on Map Init, disable availability of the second type of unit. Then, you use this action when the player completes the specific research, and you can switch the units in a building back and forth. Make sure to make both units available for training in the structure, and have both units use the same X, Y coordinates for their icon, so the transition doesn't look sloppy.

I can go into more detail later, and post screenshots too, if you don't know what I'm talking about.
This works, but how would I make the other research available, then be able to loop them?
Thanks
 
Level 6
Joined
Dec 9, 2010
Messages
121
Yes. You can make it that instead of Selling the unit instantly, you use Upgrades. However, this is sloppier, as it requires setting levels of upgrades, and you could theoretically run out of levels (as far as I know, you can't set a player's tech level backwards). Or you could make it Train the unit, instead of Selling it. Then you could add a Training Time to it, which would get the desired affect.

Don't use Wait, that's incredibly sloppy.
 
Status
Not open for further replies.
Top