• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[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