• 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.

How to make Computer move around?

Status
Not open for further replies.
Level 1
Joined
Sep 23, 2013
Messages
2
Hey so I'm new on this. I'm almost done with my map and it's because I search around but this time I need help about on how to move Computer around. I make five region and I want Computer to move randomly and attack when they saw enemy. Please help me, I'm almost done on rpg style map I'm making. Everything is finish like Computer using skills and the only problem is that the Computer stop on their place when there's no enemy around them.
 
^Did he not ask help here?

@Mykel Is it only for one player? The only difference between 'one player' and 'several players' is a unit-group pick.

Do players have multiple units? You could make them patrol to a point in the region.

Region[1]
Region[2]
Region[3]
Region[4]
Region[5]

Unit Enters Region 1/2/3/4/5

Set TempInteger = (Random number between 1 and 5)
Set TempPoint = (Random point in (Region[TempInteger]))
Unit - Order TempUnit to Attack-Move to TempPoint
Custom script: call RemoveLocation(udg_TempPoint)
Custom script: set udg_TempUnit = null

TempInteger is an Integer variable.
TempPoint is a Point variable.
TempUnit is a Unit variable.

'Temp' means temporary. It means they would work when used elsewhere, just take care of them properly.

You don't have to name them exactly, they are just standard variable names.
Don't forget to change other values if you change the name too.
 
Level 1
Joined
Sep 23, 2013
Messages
2
Thank you so much Wrathion and also Rheiko. I think I post this thread in a wrong way.
 
Status
Not open for further replies.
Top