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

What in my trigger makes the boss spawn twice?

Status
Not open for further replies.
Level 1
Joined
Nov 22, 2010
Messages
2
What in my trigger makes the boss spawn twice? [SOLVED]

There is a trigger that detects when the timer ends, when the timer does end, it turns on that trigger. Any ideas as to why it spawns twice? By the way, here are the mechanics, it's meant to spawn twenty (20) units, on non-boss waves, but on boss waves it spawns two, but it works for all the other waves.

  • Boss Waves
    • Events
      • Timer - Every 1.5 seconds of Game Time
    • Local Variables
    • Conditions
      • Or
        • Conditions
          • Current Level == 10
          • Current Level == 20
          • Current Level == 30
          • Current Level == 40
          • Current Level == 50
    • Actions
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • Spawn Count <= (20 * (Number of players in (Players on team 1)))
        • Then
          • Variable - Set Spawn Count = (Spawn Count + ((Number of players in (Players on team 1)) * 20))
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Controller of player 1) == User
            • Then
              • Unit - Create 1 Current Spawn[Current Level] for player 14 at Spawn Point [1] facing (Center of Third Move Point [1]) (No Options)
            • Else
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Controller of player 2) == User
            • Then
              • Unit - Create 1 Current Spawn[Current Level] for player 14 at Spawn Point [2] facing (Center of Third Move Point [2]) (No Options)
            • Else
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Controller of player 3) == User
            • Then
              • Unit - Create 1 Current Spawn[Current Level] for player 14 at Spawn Point [3] facing (Center of Third Move Point [3]) (No Options)
            • Else
          • General - If (Conditions) then do (Actions) else do (Actions)
            • If
              • (Controller of player 4) == User
            • Then
              • Unit - Create 1 Current Spawn[Current Level] for player 14 at Spawn Point [4] facing (Center of Third Move Point [4]) (No Options)
            • Else
        • Else
          • Trigger - Turn (Current trigger) Off
          • Variable - Set Spawn Count = 0
          • Variable - Set Current Level = (Current Level + 1)
 
Last edited:
Level 5
Joined
Jul 10, 2010
Messages
124
yes

your big spawn thing runs if: spwan count is greater than or equal to number x 20

this also sets spawn count to add number x 20

if spawn count is initially 0, it will fulfill your first if statement twice

0 <= (number x 20)
--- passes, spawns units
--- set spawn count to: spawn count + (number x 20)
(waits 1.5 seconds)

(number x 20) <= (number x 20)
--- passes, spawns units
--- set spawn count to: spawn count + (number x 20)
(waits 1.5 seconds)

2x(number x 20) </= (number x 20)
--- fails
---turns off trigger
 
Level 5
Joined
Jul 10, 2010
Messages
124
i am pretty sure the engine runs on portions of 1/32 second, so anything that is not a multiple of 0.03125 seconds will be rounded to the nearest server frame

so its probably going to be more accurate if you use:

0.125 seconds (4/32)

instead of 0.1 or 0.15
 
Status
Not open for further replies.
Top