Code:
init 10
Events
Unit - A unit Sells a unit
Conditions
((Sold unit) is A Hero) Equal to True
Actions
Unit Group - Pick every unit in (Units owned by (Owner of (Sold unit)) of type Circle of Power) and do (Actions)
Loop - Actions
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
Special Effect - Destroy (Last created special effect)
Unit - Kill (Picked unit)
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Picked player)
Unit - Move (Sold unit) instantly to ((Owner of (Sold unit)) start location)
Camera - Pan camera as necessary for (Owner of (Sold unit)) to (Position of (Sold unit)) over 0.00 seconds
Selection - Select (Sold unit) for (Owner of (Sold unit))
i don't know if is for this, but all players suddenly leave the game after they choose the heros, you know, is a footmen map, all players pick their hero almsot at the same time causing lag etc, it could be because of the trigger? leak?