Random Region

Ub3r_

New Member
Reaction score
4
So a creep enters a region. I want that creep to have a 50% chance to go to 1 region or another.
Take this diagram for example:

Code:
                                         | 
                                         |
                                         |
                                [3]-----[1]-----[2]

Like that.
 

1337Elite

New Member
Reaction score
14
Put the two regions(3 and 2) into an array. Then you just setup a counter variable which switches from 0 to 1 (0 = region 3, 1 = region 2. Or vice versa) and order them to go to those regions.

I hope it's clear. I'm too tired to know what the hell I'm writing at the moment.
 

Ub3r_

New Member
Reaction score
4
Put the two regions(3 and 2) into an array. Then you just setup a counter variable which switches from 0 to 1 (0 = region 3, 1 = region 2. Or vice versa) and order them to go to those regions.

I hope it's clear. I'm too tired to know what the hell I'm writing at the moment.

I'll give it a shot, thanks.

EDIT: Nah, didn't work. Maybe you weren't clear enough. I'll wait for an answer :)
 

Draphoelix

It's not the wintercold that's killing me
Reaction score
132
A unit enters Region 1

If
Random interger between 1-2 equal to 1
Then
Order Triggering unit to move to Center of Region 2
Else
Order Triggering unit to move to Center of Region 3
 
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