• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Units that are spawned needs to be told to walk around.. how?

Status
Not open for further replies.
Level 4
Joined
Jul 18, 2008
Messages
76
If you know how Orc Gladiators map looks like, you will understand this immediatly.

I got 3 spawns of creeps in a small map, what i need them to do is to walk around in this arena, searching for the surviving players.

How can i make this?

+rep for the helping hand :)
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
You could create some regions in the map, and order the spawned units to attack-move to random point in some other region.

Save the regions into an array. When unit enters any of the regions, order it to move to a random point in random region.

Set integer = random number between 0 and *number of regions*
Temp_Point = random point in region_array[temp_integer]
Order *unit* to attack move to Temp_Point
Custom Script: call RemoveLocation(udg_Temp_Loc)

Check that the oredered region isn't the same as the current region.

You can also add some logic there for the movement, divide the regions to different arrays, randomize the arrays and then the regions. This can be used to make the unit move to the regons that are closer, not immediately to the other side of the map.
 
Level 4
Joined
Jul 18, 2008
Messages
76
cant i order the spawned units to attack random hostile units within a region that covers the whole arena?
 
Level 4
Joined
Jul 18, 2008
Messages
76
well they are supposed to know where the hostiles are so maybe that's what i need =) thx!
 
Status
Not open for further replies.
Top