how do I issue order? (special)

MissKerrigan

Active Member
Reaction score
23
I only could choose between 6 start locations, I placed a start location at 1 of the squares this works fine but the other 79 units (were banelings but now it's random units) are moving in wrong direction
 

MissKerrigan

Active Member
Reaction score
23
yes I am using the 'position of unit' but for some reason the banelings are still attracted to the start locations
 

Phubar

Ultra Cool Member
Reaction score
30
I tried a different approach to the problem, a more "logic" one than "mathematical" one.

Name the region like in the picture and create a big region in the center called "Central square".
http://www.mediafire.com/?75dpnx5806u15s5

Create a Global variable array "Spawnin region[28]" and set:
"Spawnin region[1]"= region 1
"Spawnin region[2]"= region 2
"Spawnin region[3"= region 3
...
"Spawnin region[28]"= region 28

Then for spawn and move banelings crate a trigger:

Code:
Events
    Your event
 
Local variables
     selector = 0 <Integer>
      MyBaneling= no unit <unit>
 
Conditions
Actions
        Variable -Set selector = (Integer random between 1 and 28)
        Unit -Create 1 Baneling for player 1 1 in (center of Spawning region[selector])
        Variable -Set MyBaneling = last created unit
        If
           selector <= 14
          Then
                  Unit -Order MyBaneling to ( Move target (center of region Spawning region[(selector + 14)]
          Else
                    Unit -Order MyBaneling to ( Move target (center of region Spawning region[(selector - 14)]


Then for remove banelings crate a trigger:

Code:
Events
     unit leaves region "Central square"
Conditions
       Type of triggering unit= baneling
Actions
       Unit - remove triggering unit from the game

Those triggers are very simple to write and are short.
 

Phubar

Ultra Cool Member
Reaction score
30
I placed the number of regions in a special order so we can have two cases:
-If the baneling spawns in "region 1-14" its detination is "region (current region+14)"
-If the baneling spawns in region 15-28 its detination is "region (current region-14)"

Talking about removing banelings i noticed that when a baneling enters it's destination region it is like it leaves the center of the map. So i created a big region in the center (central square) and i made a trigger that removes the baneling when it leaves the central region instead when it enters the destination region (the case is the same).
 
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