• 🏆 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!

Looking For Trigger - Random Wandering Creep

Status
Not open for further replies.
Level 4
Joined
Dec 17, 2010
Messages
111
I was wondering if someone could point me to a tutorial or example of a trigger for making a creep wander around, or even better somehow move between waypoints or objects? I have been adding a few things to my standard melee maps like extra shops or mercs, and I thought it might be fun to have a higher level creep that perhaps wanders around the map so you have to find him to get an item from his death, etc.

Thanks for any help! I am totally clueless with triggers other than using ones I find in maps or forums :(
 
Level 9
Joined
Jul 30, 2018
Messages
445
Create a region in which you want the creep to wander. Then make a trigger like this:

  • Events
    • Time - Every [However often you want the unit to move] seconds of game time
  • Conditions
  • Actions
    • Set TempPoint = (Random point in ([Your region]))
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in ([Your region]) matching ((Unit-type of (Matching unit)) Equal to [You creep unit])) and do (Actions)
      • Loop - Actions
        • Unit - Order (Picked unit) to Attack-Move To TempPoint
    • Custom script: call RemoveLocation(udg_TempPoint)
 
Status
Not open for further replies.
Top