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

Dealing with waits

Status
Not open for further replies.
Level 5
Joined
Dec 21, 2012
Messages
89
I am using Waits for spawning for many triggers like this one and I think is making resynchronize in all triggers. Can I change this trigger for better or is better to use jass spawning system?

  • Wait 7000.00 seconds
  • Set Temp_Region = bandit respawn <gen>
  • Set Temp_Point = (Center of bandit respawn <gen>)
  • Set Temp_Point2 = (Center of bandit respawn <gen>)
  • Unit - Create 5 Bandit for Neutral Hostile at Temp_Point facing Temp_Point2
  • Custom script: call RemoveLocation (udg_Temp_Point)
  • Custom script: call RemoveLocation (udg_Temp_Point2)
  • Custom script: call RemoveRect(udg_Temp_Region)
  • Custom script: set udg_Temp_Region = null
  • Trigger - Turn off (This trigger)
  • Custom script: call DestroyTrigger(GetTriggeringTrigger())
 
Level 5
Joined
Dec 21, 2012
Messages
89
Yes I was checking it before. It help me a lot with memory leaks. Can you give me example how to use timed triggers and countdown timers for my spawning in demo map. I can make countdown timer but I don't know how to replace waits.
 
Level 25
Joined
May 11, 2007
Messages
4,650
7000 / 60 = 116 minutes? You should design your scenario better as you don't know exactly where the players will be after 116 minutes, use a "unit enters region" or similiar instead, or players who stand and wait at a certain point will be punished.
 
Level 10
Joined
Apr 18, 2009
Messages
601
Yes I was checking it before. It help me a lot with memory leaks. Can you give me example how to use timed triggers and countdown timers for my spawning in demo map. I can make countdown timer but I don't know how to replace waits.

Here's an example of a very basic creep spawning system. Every time all creeps die or the game begins, a 5 seconds timer is started. When the timer reaces 0, a wave of creeps is spawned. It might not be exactly what youre after, but if you study the triggers (ask questions if needed) you might get how timers can be used.
 

Attachments

  • Example Map.w3x
    14.6 KB · Views: 75
Status
Not open for further replies.
Top