Created unit not patrolling..

dashival

New Member
Reaction score
11
I am creating a unit at a region, then ordering it to patrol to the center of another region. The unit moves to the other region, stands there for a few seconds, then moves back. Then he stops. Is this code incorrect?
Code:
        Set L = (Center of Patrol1 <gen>)
        Set L2 = (Center of Patrol1 Dest <gen>)
        Unit - Create 1 Big Furry Monster for Neutral Hostile at L facing 90.00 degrees
        Unit - Order (Last created unit) to Patrol To L2
        Custom script:   call RemoveLocation(udg_L2)
        Custom script:   call RemoveLocation(udg_L)
 

wonderpriest

New Member
Reaction score
18
One thing everyone should know:
Neutral Hostile units are extremely rebellious. They barely ever listen to unit orders through triggers, and patrolling should be no different.

Either make a trigger that orders him to move to the opposite location when he enters one, or make the unit for a different controller.


edit: Oh yeah, and your code is great. Good job on consitantly removing leaks :thumbs_up:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top