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

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
181
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