Ok, my problem is pretty simple. In my map there is a hero that everyone is allowed to build but, once he is built, nobody else is allowed to build him. I've made it so that once he is built, the option to build him is removed from all other players, but, if he finishes and at the same time, someone is already building him, nothing happens and the unit continues to build, finishes, and then there are TWO of the unit that there is only supposed to be one of, causing a lot of problems and imbalances.
As in diasbled tech for that hero? You could use hero taverns, then simply remove the tech for each player or Neutral passive depending on who owns the taverns.
Someone else managed to get the editor to check which unit is being built and cancel it if it was equal to the unit that was already picked, maybe someone else can help you with that.
I've got it! preplace a unit and then have triggers to replace a trained dummy unit with the special hero, then disable the trigger. then have that turn on a trigger that compensates people that are already training the dummy unit when the dummy unit finishes training and have a trigger to disable the training for all players of the dummy unit
as good an idea as taht is there's a problem; no way to refer to the unit being trained, just units that finish training Edit: didn't see that it might cancel, if it does sorry for being well... however you would describe this. inability to notice key points maybe?
Dr Super Good, I'm already using the limit training of heroes to 0, and like I said before, while it disables training, those already training can continue to build it
Another problem is as follows. I did find a way so that when a player begins construction the hero it disables it for all others and when he cancels construction reenables, however, there is a problem with this. A key element in the training of the hero is that it takes an unusually long time to train and is built in a very vulnerable building, meaning that if the structure is destroyed before it is built, only then can a player start construction, therefore losing a lot of time which could have been used to build it.
What I want is as follows: -All players are allowed to train the hero, even if someone else is. Once someone COMPLETES the training of the hero, all other players are no longer allowed to train him and he his production is canceled for all players currently training him, thereby returning the resources to the player who ha their hero canceled.
use my idea. have a preplaced unit in some dark corner of the map and have the people actually train a dummy unit with the same icon as the hero then replace the trained dummy with the real unit, remove the dummy unit and disable that trigger. then, turn on a trigger that removes all other dummy units and compensates players for their time. there are even a couple ways of doing it, meaning if one doens't work you can use another.
Well, another key element is once he's killed he is once again available to be trained by any player.
But, I was thinking about your idea, and started changing it a little, and somehow I ended with this:
Events - A unit finishes training Conditions - Unit type of unit finishing training = My Hero Actions - Remove Trained Unit from the game Actions - Add 100 to owner of trained unit's gold Actions - Add 100 to owner of trained unit's lumber
This trigger is initially off, and when the hero is trained, is turned on, and when the hero dies, is turned back off. Using this in conjunction with limiting hero training to 0, the problem is effectivly solved. And while it could be better, it's good enough for me, so thank you all who helped.
Give more detail on the building since if it only makes that hero it is easy.
Have it that once someone finishes the hero it removes all of that building and places a new one in its place (flushing all production ques)
You could even have it that the production is timer based and the build dummy is killed after it is built. Then the first person to have their timer expire gets the hero while all after that get refunded.
There are many other ways but theses I think will work.