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

[Problem] Making units randomly walk around the map

Status
Not open for further replies.
Level 1
Joined
May 7, 2011
Messages
1
Hello everyone this is my first post here, but I've had been around for some time reading and learning.

But this time I couldn't find anything to help me so I felt I had to post it.

The thing is:

Im trying to make a trigger that make units walk around the map randomly.

At first I had it time-based, like:

"Event- Every x seconds of game time"
Action- Unit Issue Order Targeting a random point in playable map area"

And it worked out just fine, but now I want them to walk, only if certain conditions are satisfied and I can't use conditions like "Hero has X type of item in the inventory" with the "Time Periodic Event" and I don't know another way of making units walk around the map =/

TL:DR Is there anyway to make units walk randomly around ONLY IF certain conditions are satisfied?

Any help is appreciated =) o/
 
Pick those units

  • Tr
  • Events
    • Time - Every 14.00 seconds of game-time
  • Conditions
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in (Playable Map Area)) and do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • ((Picked unit) has an item of type X) Equal to False
          • Then - Actions
            • Set Point1 = (Random point in (Playable Map area))
            • Unit - Order (Picked unit) to Move to Point1
            • Custom script: call RemoveLocation (udg_Point1)
          • Else - Actions
 
Status
Not open for further replies.
Top