HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Wandering units?

08-11-2011, 01:06 AM#1
whitefang
I would like some help in makeing units wander around and attack enemys they find. Iv tryed the wander ability, but it just causes them to run around like idiots, attacking once in a while but run around at the same time.

any help would be nice
08-11-2011, 08:03 AM#2
Nestharus
Order unit to random pathable point in rect that can be accessed by that unit. When unit stops, order to next random point. Ensure each point is far away.
08-12-2011, 02:36 AM#3
whitefang
Quote:
Originally Posted by Nestharus
Order unit to random pathable point in rect that can be accessed by that unit. When unit stops, order to next random point. Ensure each point is far away.
Can you please show me how to make the trigger?
08-12-2011, 02:25 PM#4
Fasolace
You can use the wander ability and when the enemy engage, remove the ability from the unit.

Trigger:
Collapse Events
Unit - A Unit Is Attacked
Collapse Conditions
Level of Wander for Triggering Unit Equal to 1
Collapse Actions
Unit - Remove Wander from Triggering Unit

Use Integer Comparison for the condition.
08-19-2011, 08:38 PM#5
whitefang
It seems to work, but the monsters don t wander a big enough distence, any idea how to increase the distence they wander.
08-25-2011, 03:11 PM#6
[VDM]Amn
the wander ability has two range values, test them out
also has the time between moves
09-08-2011, 01:20 AM#7
Matarael
You might want to try to remove the "can flee" option from the unit too, I *think* it can cause them to run away while fighting (like getting distracted).