| 07-24-2008, 08:33 AM | #1 |
Is there any way to change unit owner without canceling any orders? I am trying to make a command that swaps two players, their heroes, teams etc etc. It works but the orders that were given before the players were swapped got canceled. Is there anything I can do about it or I would have to write a mechanism that would save the orders and re-issue them? Actually thats good enough because the channeling spells seem to stop (I haven't actually tried it with channeling, but if a spell has a long cast time it will be stopped). |
| 07-24-2008, 09:21 AM | #2 |
You do not need to change owner of units to transfer control. There is many fun with setting ally flags to yourself. You can make player(0) enemy of player(0) this will disable unit control and vision, then shere control with player 1. This will transfer unit control. |
| 07-24-2008, 09:36 AM | #3 |
Oh you can share control with enemies? good But its less very friendly to the existing map engine (well I suppose I could replace GetOwningPlayer with GetOwningPlayerEx) But swapping players is the easiest way to pick heroes for other players.. |
