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

Need help with setting up triggers

Status
Not open for further replies.
Level 2
Joined
Feb 4, 2014
Messages
7
being new to all this i have read some tutorials on triggers but im not sure how to set a few up on a basic 1 vs 1 map that i made to help familiarize myself with the world editor. im trying to get the only creep camp in the middle to respawn every like 2 mins and if i remember i need a region set up too which ive done but now not sure how to proceed. any help would be appreciated.
 
Level 10
Joined
Apr 18, 2009
Messages
601
So you have a region in the middle of the map where you want to spawn creeps every 2 minutes?

You'll need one trigger for this. The event of the trigger will be to run the actions every 120.00 seconds:
  • Events
    • Time - Every 120.00 seconds of game time
The actions will be to create units for the Neutral Hostile player at your region. This is an example creating two timber wolves and one giant wolf:
  • Actions
    • Unit - Create 2 Timber Wolf for Neutral Hostile at (Center of Creep Spawn Region <gen>) facing Default building facing degrees
    • Unit - Create 1 Giant Wolf for Neutral Hostile at (Center of Creep Spawn Region <gen>) facing Default building facing degrees
So the entire trigger will be:
  • Periodic Creep Spawn
    • Events
      • Time - Every 120.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 2 Timber Wolf for Neutral Hostile at (Center of Creep Spawn Region <gen>) facing Default building facing degrees
      • Unit - Create 1 Giant Wolf for Neutral Hostile at (Center of Creep Spawn Region <gen>) facing Default building facing degrees
Because you are just starting out I created this as basic as possible. This will just spawn new units every 2 minutes and the creep camp will grow bigger and bigger. In reality you'll want to check if the region is empty before spawning new creeps (or use more advanced methods involving "variables").

Then there's this thing called "memory leaks" that you shouldn't worry about at this stage, regardless of how many times you get told by people here to "clear your leaks" or whatever. Simply focus on getting things to work.

If you understand the basics of this trigger and want to add functionality like checking to see if the region is empty before spawning new units then we could guide you through that next.

I have attached an example map with this trigger.

Please ask if something is unclear to you.
 

Attachments

  • Example Map.w3m
    12.2 KB · Views: 84
Status
Not open for further replies.
Top