- Joined
- Aug 8, 2010
- Messages
- 1,022
Hi! how i can make a unit move randomly around the map every second? please help! +rep for helping me! 

but every second the point is set.The unit would walk and stop on the spot.the trigger i mentioned runs a check on whether the unit has reached the area and generates an area afterwards.
Trigger
Events
Time - Every 1.00 seconds of game-time
Conditions
Actions
Set Points[1] = (Position of (Your unit))
Set Points[2] = (Points[1] offset by (Random real number between 150.00 and 300.00) towards (Random angle))
Unit - Order (Your unit) to Move to Points[2]
Custom script: call RemoveLocation (udg_Points[1])
Custom script: call RemoveLocation (udg_Points[2])
Still, "every 0.01 seconds" is NOT good: I always use every 0.032 seconds (JASS), or every 0.03 seconds (GUI).but every second the point is set.The unit would walk and stop on the spot.the trigger i mentioned runs a check on whether the unit has reached the area and generates an area afterwards.