• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

What in my trigger makes the boss spawn twice?

Status
Not open for further replies.

Frozen_Shadow

F

Frozen_Shadow

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 by a moderator:
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
 
Yes, thank you, but it says in the title solved already!
 
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.
Back
Top