- Joined
- Jun 9, 2008
- Messages
- 309
Now I have experimented with several versions of this already - I bet many of you are familiar by now with the good old "Squad" concept, several maps use something like that.
The idea is to have a group of "support" units who always stay close to a "main" unit, the player only controls the main unit. Useful for controlling huge swarms/armies of units.
I am actually quite happy with the latest system I have for this.
Trigger spawns support units when you create the main unit, support units are made attackable but unselectable by using Locust and Chaos, and then movement triggers make sure that whenever the main unit moves, the support units follow.
Here's the basic setup:
But now I ran into an unexpected problem:
It works perfectly for human players, or "hollow" computer players (computer players without a AI).
But as it turns out, the full-AI computer player can still manually control units that are supposed to be unselectable.
[EDIT: Did some more reading, and realize that is ALSO a very common problem, actually. I'll see if I someone had found a fix that works in my case, and change this to "SOLVED" if possible.]
[EDIT1: The GUI AI action "eliminate guard positions" seems to do the trick, but I'll have to do more testing.]
What that means is that they will treat the support units like any other unit, and use them separately from their main unit, usually by making them chill uselessly at the base.
Now, one obvious work-around is to have periodic triggers that force the support unit to move close to their main unit at regular interval, "fighting" against the orders of the AI.
I know that this works, but I really want to avoid periodic triggers, I really fear they add to the lag of the map.
To salvage my current solution, is it possible to deny the AI control of the support units?
If not, is there another fix for this?
The idea is to have a group of "support" units who always stay close to a "main" unit, the player only controls the main unit. Useful for controlling huge swarms/armies of units.
I am actually quite happy with the latest system I have for this.
Trigger spawns support units when you create the main unit, support units are made attackable but unselectable by using Locust and Chaos, and then movement triggers make sure that whenever the main unit moves, the support units follow.
Here's the basic setup:
-
-------- Boat2 --------
-
Unit - Create 1 Fleet Support (1st Fleet) dummy for (Owner of (Triggering unit)) at Standpoint facing Default building facing degrees
-
Set Replazzo = (Last created unit)
-
Unit - Set the custom value of Replazzo to (Custom value of (Triggering unit))
-
Custom script: call UnitAddAbility(udg_Replazzo, 'Aloc')
-
Unit - Add Chaos for Fleet 1 to Replazzo
-
Unit Group - Add Replazzo to Fleet
But now I ran into an unexpected problem:
It works perfectly for human players, or "hollow" computer players (computer players without a AI).
But as it turns out, the full-AI computer player can still manually control units that are supposed to be unselectable.
[EDIT: Did some more reading, and realize that is ALSO a very common problem, actually. I'll see if I someone had found a fix that works in my case, and change this to "SOLVED" if possible.]
[EDIT1: The GUI AI action "eliminate guard positions" seems to do the trick, but I'll have to do more testing.]
What that means is that they will treat the support units like any other unit, and use them separately from their main unit, usually by making them chill uselessly at the base.
Now, one obvious work-around is to have periodic triggers that force the support unit to move close to their main unit at regular interval, "fighting" against the orders of the AI.
I know that this works, but I really want to avoid periodic triggers, I really fear they add to the lag of the map.
To salvage my current solution, is it possible to deny the AI control of the support units?
If not, is there another fix for this?
Last edited: