Variables/Unit Group

From HIVE
Revision as of 10:27, 27 March 2013 by DevliN (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

A Unit Group is a Variable type used in the trigger editor. It is used to store a group of created units to be issued orders, have properties changed, referenced for something, and so on.

For each integer, it will create one marine for the picked integer. Then it will add that unit to a unit group variable.

In the above example, the trigger will pick each integer between 1 and 4. For each integer picked, it will create one marine for the picked integer in the center of the map. Then, the unit is added to a unit group, "Unit Group Variable".


Issue Units' Orders.jpg

In this trigger, it will pick each unit in the unit group "Unit Group Variable" and tell them to attack to a random point in the map. Make sure that the first parenthesis ("(Attack targeting (Random...") is set to "Order Targeting Point".

If you would like to reference a single unit from the unit group, use the Function "Convert Unit To Unit Group". You may also choose to select a unit from a certain position in the unit group. For example, if you added an SCV to "Unit Group Variable", he would have the index of 1. If you later added a Marine to "Unit Group Variable", the Marine would then have the index of 2. So, using the function "Unit from Unit Group" (which must be used in conjunction with the "Issue Order" action and not "Issue Order to Unit Group", assuming you want to issue orders) and using the index of "1" will return the SCV.