new issue with unit spawning

Druzzl

You can change this now in User CP.
Reaction score
1
alright, so i've created an array with most of the units in them, 0-11 are the lower level ground units, 12-19 are the upper level ground units, and 20-29 is the air units, but when i use

Code:
                General - While (Conditions) are true, do (Actions)
                    Conditions
                        Units Created <= 2
                    Actions
                        Variable - Modify Units Created: + 1
                        Unit - Create (Random integer between 0 and 7) Unit Array[(Random integer between 0 and 11)][1] for player 15 at Point 10000 using default facing (No Options)
                        Unit - Create (Random integer between 0 and 7) Unit Array[(Random integer between 0 and 11)][1] for player 15 at Point 20000 using default facing (No Options)
it gives me any unit in the entire array, and creats 10 different types of units instead of 4 for each player...
 

X-maul

AKA: Demtrod
Reaction score
201
I'm not sure what you want to happen? Do you want to create a random unit for each player?
 

Druzzl

You can change this now in User CP.
Reaction score
1
i'm trying to create x units. i put the units in an array to try to get a random unit between 0 and 11 for now, later it gives 0-19 then still later it's any unit. it creates the correct amount of units, but pulls a random unit from the entire array, instead of just part of it.
 

Phubar

Ultra Cool Member
Reaction score
30
Code:
Unit - Create 1 Unit Array[(Random integer between 0 and 11)] for player 15 at Point 1000 using default facing (No Options)

to create a unit of the random type from 0 to 11.

Your trigger creates a random number of unit (0-7) of unit type (Unit Array[random 0-11][1]) in point "one" and dopes the same for point "two".
I dont understand why you made a two dimension array, the second dimension ([1]) what is?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top