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

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