Adding units to a Unit-Group

Awlips

New Member
Reaction score
1
I need a Unit-Group of specific units for a map I'm working on, but I've hit a wall...b/c I can't seem to find out how to add a group of units to said Unit-Group.
 
How are you sorting the units you want?
Are you trying to pick all of a particular unit type, or all of a particular unit type owned by a player, or all owned by a player, etc?
 
Unit Group - Add Unit. Set the Unit (or Units you want to add) in a Variable first.
 
How are you sorting the units you want?
Are you trying to pick all of a particular unit type, or all of a particular unit type owned by a player, or all owned by a player, etc?

I'm picking about 58 specific, different units which are all on the map itself.

Unit Group - Add Unit.

Can you walk me through the (most likely embarrassingly simple) steps to add the units I want into the Unit-Group.
 
So there is absolutely nothing in common between these units? Because using Group - Add Unit will take a long time for 58 units.
 
58 specific units? Whoa...that'd take quite some time to add...perhaps make it so they have at least something in common? A buff, perhaps?
 
You can try making the units common in Object Editor. You can do this by adding a dummy ability without icon. Then pick the units by checking the ability presence in them. Else, you can also adjust their Point Value to a unique number so that you can refer to this value. Also, you can change their classification, though this might not be preferable. Anyway, do anything that's possible to make them common in the Object Editor so that you can use them in-game.
 
71 units, all considered "Custom Units -> Neutral Passive -> Meele -> Heroes" Where do I actual begin to add units to the unit group?
 
Code:
Set TempGroup = (Units owned by Neutral Passive matching (((Triggering unit) is A Hero) Equal to True))
 
Figured out how to add units to a unit group via a trigger, but with the current conditions it adds units for players who may not necessarily be playing. It doesn't impair the gameplay but obviously something I'd prefer to avoid. How can I best specify the trigger to only add the 1/71 units to the players actually playing?
 
Well I'm not exactly sure what you are trying to do with the group. Can you post your whole trigger please?
 
Also, please explain how are the heroes created in the map =.=. Through tavern? If so, just add 'Sold unit' to the unit group when the unit is bought. Only add them when they are created.

Code:
Event
 A unit sells a unit
Condition
 (Sold unit) is a hero Equal to True
 Unit type of (Triggering unit) Equal to YOurTavern
Actions
 Unit Group - Add (Sold unit) to YourUnitGroup
 
Events
-Player - Player 1 (Red) types a chat message containing -AR as An exact match

Conditions
-(AR Timer 0480 <gen> is alive) Equal to True

Actions
-Unit - Explode Hero Selector 0178 <gen>
-// // // // 2-12
Unit - Create 1 (Unit-type of (Random unit from Starters)) for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
-// // // // etc. Players 2-12


ATM this is generating a random hero for each of 12 players, regardless of whether or not they are in fact actually playing. I'd like to change it so it only spawns heroes for actual players (or computers)
 
Events
-Player - Player 1 (Red) types a chat message containing -AR as An exact match

Conditions
-(AR Timer 0480 <gen> is alive) Equal to True

Actions
-Unit - Explode Hero Selector 0178 <gen>
-// // // // 2-12
Unit - Create 1 (Unit-type of (Random unit from Starters)) for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
Unit group - Add (Last created unit) to YOURUNITGROUP
-// // // // etc. Players 2-12


Just add the bolded line.
 
Code:
Untitled Trigger 001
    Events
        Player - Player 1 (Red) types a chat message containing -AR as An exact match
    Conditions
        (AR Timer 0480 <gen> is alive) Equal to True
    Actions
        Unit - Explode Hero Selector 0178 <gen>
              etc
        Player Group - Pick every player in (All players matching (((Matching player) slot status) Equal to Is playing)) and do (Actions)
            Loop - Actions
              Unit - Create 1 (Unit-type of (Random unit from Starters)) for (Picked player) at (Center of (Playable map area)) facing Default building facing degrees
 
Thx guys, with your help I worked it out. It was a trigger permitting red to trigger an All Random function from 71 heroes to those player in game.

next up...a single random option...and then the real trouble makers, custom quantity duels. (I'll need some help then :p! )
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    It is weird seeing a way more realistic users online number
  • The Helper The Helper:
    Happy Tuesday Night!
    +1
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top