Regiments

Stigoz

New Member
Reaction score
1
I am doing a map where every unit is created in regiments of 10-30.

I've already made how to create them.

But how do i make them be selected as a regiment, i've already tried to make them each a unit-group, but how do i give them each their own "array" of the unit-group variable?

And how do i make the trigger so that when i select one unit, i automaticly select his whole unit-group?


I'm not that good at english, hope you can understand it :/
 
I would try this:

Code:
selection
    Events
        Player - Player 1 (Red) Selects a unit
    Conditions
    Actions
        For each (Integer A) from 1 to 100, do (Actions)
            Loop - Actions
                Unit Group - Pick every unit in groups[(Integer A)] and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Triggering unit) is in groups[(Integer A)]) Equal to True
                            Then - Actions
                                Unit Group - Pick every unit in groups[(Integer A)] and do (Actions)
                                    Loop - Actions
                                        Selection - Add (Picked unit) to selection for Player 1 (Red)
                            Else - Actions
groups[x] is a unit group array in which you store all of your regiments
 
How can i make the whole group as ONE selection?

And how do i make the regiment as ONE group in the first place?
 
I would try this:

Code:
selection
    Events
        Player - Player 1 (Red) Selects a unit
    Conditions
    Actions
        For each (Integer A) from 1 to 100, do (Actions)
            Loop - Actions
                Unit Group - Pick every unit in groups[(Integer A)] and do (Actions)
                    Loop - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Triggering unit) is in groups[(Integer A)]) Equal to True
                            Then - Actions
                                Unit Group - Pick every unit in groups[(Integer A)] and do (Actions)
                                    Loop - Actions
                                        Selection - Add (Picked unit) to selection for Player 1 (Red)
                            Else - Actions
groups[x] is a unit group array in which you store all of your regiments

Yeesh, that would create 200 memory leaks every time red selects a unit. :eek:


I'm not sure what you're asking for. If you're asking how to select more than twelve units, you can't. That's hardcoded. If you're asking something else, please go into a bit more detail. :)
 
You could make a regiment leader and make the other units of the regiment be owned by another player (computer) and make them follow the leader.
 
You don't really need to have the regiment following a leader be owned by a different player. I have a regiment map where 12 units follow a leader by getting ordered to "attackmove" "move" "smart" "attack" to the same spot or unit the leader has targetted. It works really well becouse the leader ends up standing in the middle of the squad. The big problem was making it so that new units that were spawned would join the regiment after a unit died. I simply made it so when a unit dies it will wait 60 sec. then "replace" the unit, which keeps it in the unit group. (Still you cant have more than 12 following)
Does anyone know if you could do it through 2 sets of identicle triggers? Would the second set select the same units as the first to follow?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top