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

[Trigger] Chaining spawns

Status
Not open for further replies.
Level 3
Joined
Oct 9, 2007
Messages
16
Ok i have searched the forums to find a solution to my spawn problem but did not found any. So here is my problem :

I am trying to make a TD spawning system, the first spawn is triggered by the the end of a timer window created 10 seconds after game start. This is ok for the first spawn.

The exemples i found on tutorials or maps i have edited are to check when foods owned by player 12 (or whatever no playing player) becomes equal to zero. This method works fine, but as i want to make different game modes i need to manage each players spawn separetly.

I have eight players (red, blue, teal, purple, yellow, orange, pink, green) and 4 more non players to manage spaws (player 9 for red and blue, player 10 for teal and purple, player 11 for yellow and orange and player 12 for pink and green).

The normal mode should work like this : all creeps spawn at the same time for each player, and the next wave should spawn after all creeps on the map are dead. I don't find the way i can trigger waves after the first one is cleared, or how to detect that the first waves on entire map are cleared.

i can't just check if "foods owned by player 9 becomes equal to zero" otherwise creeps will eventually spawn for players that did not finished their waves yet, and if i put the four events :

"foods owned by player 9 becomes equal to zero"
"foods owned by player 10 becomes equal to zero"
"foods owned by player 11 becomes equal to zero"
"foods owned by player 12 becomes equal to zero"

Nothing happen after the first wave is cleared. I tried to make a complex trigger counting creeps on the entire map after each kill, to run the next wave after that number becomes equal to zero but that doesnt work.

Anyone got an idea on how to trigger the waves ?
 
Level 3
Joined
Nov 11, 2007
Messages
39
I would use the pick every unit of type function multiple times to add unts to a group then check to see that the unit group is empty if your having problems using food.

Im pretty sure that your trigger is checking avaliable food and not food used.


could you go to your trigger and rightclick the trigger name in the righthand window and copy it as text and place it between trigger tags?

  • Player - Player 12 (Brown)'s Food used becomes Equal to 0.00
 
Level 3
Joined
Oct 9, 2007
Messages
16
utilisée = used because i am using a french version.
By the way that works when the player is playing, but the food do not "BECOME" = to zero when a player is not playing.

  • Spawn Survival Init
    • Evénements
      • Temps - Elapsed game time is 5.00 seconds
      • Joueur - Joueur 12 (Marron)'s Nourriture utilisée becomes Egal à 0.00
    • Conditions
    • Actions
      • Set player_ingame = (All players matching ((((Matching player) slot status) Egal à Joue) and (((Matching player) controller) Egal à Utilisateur)))
      • Set Creep_Level_Count = (Creep_Level_Count + 1)
      • Set Gold_Income = (Gold_Income + 10)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • (red_creep_count[10] Egal à 1) or (((Joueur 1 (Rouge) controller) Différent de Utilisateur) or ((Joueur 1 (Rouge) slot status) Différent de Joue))
          • (blue_creep_count[10] Egal à 1) or (((Joueur 2 (Bleu) controller) Différent de Utilisateur) or ((Joueur 2 (Bleu) slot status) Différent de Joue))
          • (teal_creep_count[10] Egal à 1) or (((Joueur 3 (Cyan) controller) Différent de Utilisateur) or ((Joueur 3 (Cyan) slot status) Différent de Joue))
          • (purp_creep_count[10] Egal à 1) or (((Joueur 4 (Pourpre) controller) Différent de Utilisateur) or ((Joueur 4 (Pourpre) slot status) Différent de Joue))
        • Alors - Actions
          • Wait 2.00 seconds
          • Groupe joueur - Pick every player in player_ingame and do (Actions)
            • Boucle - Actions
              • Partie - Victory (Picked player) (Montrer dialogs, Montrer scores)
        • Sinon - Actions
          • Compte à rebours - Create a timer window for Timer_Variable with title ((Wave + (String(Creep_Level_Count))) + in :)
          • Compte à rebours - Start Timer_Variable as a Un coup timer that will expire in 15.00 seconds
          • Set Timer_Window = (Last created timer window)
          • Compte à rebours - Montrer Timer_Window
          • Groupe joueur - Pick every player in player_ingame and do (Actions)
            • Boucle - Actions
              • Joueur - Add Gold_Income to (Picked player) Or actuel
 
Level 3
Joined
Oct 9, 2007
Messages
16
I have tried an other method that is working to check if all players finished their waves, but I wanted to know if it is not too heavy :

This trigger for each players that control creeps :
  • Player 9 ok
    • Evénements
      • Joueur - Joueur 9 (gris)'s Nourriture utilisée becomes Egal à 0.00
    • Conditions
    • Actions
      • Set pop_ready[1] = TRUE
This trigger to control non playing players :
  • non playing pop
    • Evénements
      • Temps - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • (Joueur 2 (Bleu) controller) Différent de Utilisateur
          • (Joueur 2 (Bleu) slot status) Différent de Joue
          • (Joueur 1 (Rouge) controller) Différent de Utilisateur
          • (Joueur 1 (Rouge) slot status) Différent de Joue
        • Alors - Actions
          • Set pop_ready[1] = TRUE
        • Sinon - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • (Joueur 4 (Pourpre) controller) Différent de Utilisateur
          • (Joueur 4 (Pourpre) slot status) Différent de Joue
          • (Joueur 3 (Cyan) controller) Différent de Utilisateur
          • (Joueur 3 (Cyan) slot status) Différent de Joue
        • Alors - Actions
          • Set pop_ready[2] = TRUE
        • Sinon - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • (Joueur 6 (Orange) controller) Différent de Utilisateur
          • (Joueur 6 (Orange) slot status) Différent de Joue
          • (Joueur 5 (Jaune) controller) Différent de Utilisateur
          • (Joueur 5 (Jaune) slot status) Différent de Joue
        • Alors - Actions
          • Set pop_ready[3] = TRUE
        • Sinon - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • (Joueur 8 (Rose) controller) Différent de Utilisateur
          • (Joueur 8 (Rose) slot status) Différent de Joue
          • (Joueur 7 (Vert) controller) Différent de Utilisateur
          • (Joueur 7 (Vert) slot status) Différent de Joue
        • Alors - Actions
          • Set pop_ready[4] = TRUE
        • Sinon - Actions
And this one to start pop timer window and pop :
  • Spawn Normal Init
    • Evénements
      • Temps - Every 2.00 seconds of game time
    • Conditions
      • pop_ready[1] Egal à TRUE
      • pop_ready[2] Egal à TRUE
      • pop_ready[3] Egal à TRUE
      • pop_ready[4] Egal à TRUE
    • Actions
      • Set player_ingame = (All players matching ((((Matching player) slot status) Egal à Joue) and (((Matching player) controller) Egal à Utilisateur)))
      • Set Creep_Level_Count = (Creep_Level_Count + 1)
  • ... Compte à rebours - Montrer Timer_Window
 
Status
Not open for further replies.
Top