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

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,651
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
576
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: 73
Status
Not open for further replies.
Top