Ordering spawned units to randomly attack players

Status
Not open for further replies.
Level 3
Joined
May 12, 2008
Messages
42
I want to make a similar map to that, how can i make it so that spawned units in a region will randomly attack random players?

Guys please! I need a answear for my map! I tryed using map inilization and run melee ai for computer player but the units spawned for the computer player just stay at the place they were spawned
 
Last edited by a moderator:
Guys please! I need a answear for my map! I tryed using map inilization and run melee ai for computer player but the units spawned for the computer player just stay at the place they were spawned

Dude, chill, it hasnt even been a day yet, ppl on the hive have other things to do than sit at the computer in the fetal position rocking back and forth waiting for somebody to post so they can read and reply, give people some time to answer, also, dont double post, i can almost guarantee that your gonna get told this same thing by about for other members.
 
use variables, make a integer variable called attackvariable (or whatever you like)
in my example player 12 is the attacking player; 1-11 are attacked


  • Events
    • Unit - A Unit enters <your region>
  • Conditions
    • triggering unit is owned by player 12
    • choose any
  • Actions
    • set <attackvariable> random integer number between 1 and 11
    • if attackvariable equal to 1 order triggering Unit to attack player1
    • if attackvariable equal to 2 order triggering Unit to attack player2
    • ....
player1 and player2 can be regions or buildings or sth that should be attacked
 
I'm assuming you mean variables in general, and you do that via the yellow X in the trigger editor.

BTW: If you are making a map like mine, please give me the credit :)
 
Status
Not open for further replies.
Back
Top