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

Making peasants wander around town

Status
Not open for further replies.
Level 32
Joined
Oct 23, 2006
Messages
5,291
Aye: wander is an ability used by critters, just give your townsfolk that ability.

However they will then be able to wander over the entire map. If you wish them to remain inside the town, you'll need to either:
  • Place pathing blockers to contain the townsfolk (not recommended as blockers would also inhibit other units).

  • Engineer a "Wander Trigger" tied to a region/react that would force all designated wanderers to periodically move to a random point in the town (or prevent them from leaving it).
 
Level 9
Joined
Oct 17, 2007
Messages
547
If those peasants are already in the map when its loaded and not trigger created you can try making one big region that cover your entire town and order those specific units to move bavk to center of town if they leave that region. Make sure you pay attention to location leaks while making that trigger though.
 
The Ansewer is very simple:

First, give townsfolk the Wander Ability

Second, create a region that covers all your town. Lets call it "TownsfolkRange"

Then create the trigger:

Events:
Unit - A unit leaves TownsfolkRange

Conditions:
Unit type of leaving unit is equal to Peasant

Actions:
Unit - Order Leaving Unit to move to random point of TownsfolkRange
 
Level 9
Joined
Oct 17, 2007
Messages
547
The Ansewer is very simple:

First, give townsfolk the Wander Ability

Second, create a region that covers all your town. Lets call it "TownsfolkRange"

Then create the trigger:

Events:
Unit - A unit leaves TownsfolkRange

Conditions:
Unit type of leaving unit is equal to Peasant

Actions:
Unit - Order Leaving Unit to move to random point of TownsfolkRange

make sure u pay attention to leaks while u make this though
 
Status
Not open for further replies.
Top