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

Cancelling Allied Unit Builds

Status
Not open for further replies.
Level 11
Joined
Jun 21, 2007
Messages
643
Ok On my map I've hit a problem. Player 6 is an ally with full shared unit control, however. I can't figure out a way to see if the player that builds the unit has enough money to build that unit and if they don't to cancel the build order.
Any help or pointing in the right direction would be good =]
 
Well, depending on the constructed structure/unit, you can use a condition to check for the current resources of the 6th player. This is an integer comparison, Player section. Then, it will go like "Player 6 (Green) Current gold Less than X" then "Game - Display to (All allies of (Owner of (Triggering unit)) the message: "We need more gold."" I don't get it though; are the rescources required custom-made, from triggers? Else, it should get a game message, stating that there is not enough of gold to proceed with the order.
 
Level 11
Joined
Jun 21, 2007
Messages
643
Right sorry my bad at the explaining. ok here we go:
Player 6(Orange) owns a bunker where units can be trained for gold
player 1 has full shared unit control with player 6
I want it so when player 1 orders a unit from the bunker player 1 pays for it, and if player 1 doesn't have enough gold, the construction is cancelled.
that should be a lot clearer :D
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
WC3 does not support this.

You can try detecting who has the building selected when it is given the build order, and based on that converting the ownership of the produced units to the right players, but this will only allow one player to select the building at a time.

The second is to change the way they are spawned, to one which allows more feedback on who builds it. For example removing full shaired unit control and isntead make the units hireable.
 
Status
Not open for further replies.
Top