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

Multiple Conditions doesnt work

Status
Not open for further replies.
Level 6
Joined
Mar 1, 2013
Messages
52
Hello guys, i just started to create a map for friend called The Shadow Hunt But i have one BIG Problem:

Main objective of the game is to get out from the Labyrinth.
There are four different exit doorways which open only when Ghost capture a player and start to consume him. Then all other players will have 15 seconds to get out from Labyrinth before Ghost kills captured player. After Ghost kills a player, doors will close and he will need to catch another player for door open. When there will be at least one surviving player, two special keys will start spawning. Last surviving player must find both keys and combine them into the one Universal Key which can open any doors in labyrinth. But he will have a limited time 5 minutes, before ghost catch him. Through the game there will be spawn of random items which can help players to betray each other and leave them for ghost. Spawn time is once every 4 seconds. Special keys for Last Stand have 5 seconds spawn time.

Now, my problem is when, for example player 2,3,4,5 and 6 are dead then Last stand Timer trigger for last alive player does not start. I really dont know what to do i tried everything possible what i can.
Sorry for some misunderstanding im Czech and my editor is in Czech Language

  • Last Stand 1
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Survivor[2] is dead) Equal to TRUE
          • (Survivor[3] is dead) Equal to TRUE
          • (Survivor[4] is dead) Equal to TRUE
          • (Survivor[5] is dead) Equal to TRUE
          • (Survivor[6] is dead) Equal to TRUE
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on Special Item <gen>
      • Trigger - Turn off Random Drop <gen>
      • Quest - Display to (All players) the UpozornÄ›nĂ* message: |cff32cd32YOU ARE T...
      • Countdown Timer - Start Timer as a Jedenkrát timer that will expire in 300.00 seconds
      • Countdown Timer - Create a timer window for Timer with title You will die in
      • Set Timer = (Last started timer)
      • Set Timer_window = (Last created timer window)
      • Countdown Timer - Show Timer_window for Player[1]
      • Countdown Timer - Show Timer_window for Player[2]
      • Countdown Timer - Show Timer_window for Player[3]
      • Countdown Timer - Show Timer_window for Player[4]
      • Countdown Timer - Show Timer_window for Player[5]
      • Countdown Timer - Show Timer_window for Player[6]
      • Countdown Timer - Show Timer_window for Player[11]
      • Countdown Timer - Show Timer_window for Player[12]
      • Trigger - Turn off Nobody Stands <gen>
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
-why turn off trigger in 1st line?

-why u use periodic timer for event? u could use simple if a Survivor dies (like add event to trigger where u can use variables and special unit event)

or add all survive into 1 unit group, lets call it survivor_group, then check how much unit left in group :p

-exist show timer, that applied to all player so dont need to make it [1-12] or in ur map player 7/8/9/10 is human player who cant see the timer?

anyway if u want u can upload to bin and i can check
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
"And - All Conditions" is obsolete here, because:
  • Conditions
    • Boolean1 Equal to True
    • Boolean2 Equal to True
already means that Boolean1 AND Boolean2 have to be true.

You can also show the timer window for all players at once, instead of doing it per player with:
  • Countdown Timer - Show (Last created timer window)
And the timer window shows by default, so no need to use that action.

Anyway, those shouldn't be the problems.
I've uploaded a map that does what you want, it works without any problems.
Check if there's anything different. And don't forget to debug your triggers!

Edit: @Shadow: turning off the trigger is to make sure it doesn't mess with the timer.
If another unit dies (or in his case, 2 seconds later), the timer will be reset and a new timer window will be created.
 

Attachments

  • Suicide.w3x
    17.3 KB · Views: 85
Level 6
Joined
Mar 1, 2013
Messages
52
"And - All Conditions" is obsolete here, because:
  • Conditions
    • Boolean1 Equal to True
    • Boolean2 Equal to True
already means that Boolean1 AND Boolean2 have to be true.

You can also show the timer window for all players at once, instead of doing it per player with:
  • Countdown Timer - Show (Last created timer window)
And the timer window shows by default, so no need to use that action.

Anyway, those shouldn't be the problems.
I've uploaded a map that does what you want, it works without any problems.
Check if there's anything different. And don't forget to debug your triggers!

Edit: @Shadow: turning off the trigger is to make sure it doesn't mess with the timer.
If another unit dies (or in his case, 2 seconds later), the timer will be reset and a new timer window will be created.

I made it like you in that map but in my map it still doesnt work. The trigger doesnt want to start. And what did you mean debug Triggers ? Im still newbie in editor trying to do harder things :D
This works only when i kill all the units at once with command

  • Last Stand 1
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Survivor[2] is dead) Equal to TRUE
      • (Survivor[3] is dead) Equal to TRUE
    • Actions
      • Trigger - Turn off (This trigger)
      • Trigger - Turn on Special Item <gen>
      • Trigger - Turn off Random Drop <gen>
      • Quest - Display to (All players) the UpozornÄ›nĂ* message: |cff32cd32YOU ARE T...
      • Countdown Timer - Start Timer as a Jedenkrát timer that will expire in 300.00 seconds
      • Countdown Timer - Create a timer window for Timer with title You will die in
      • Set Timer = (Last started timer)
      • Set Timer_window = (Last created timer window)
      • Trigger - Turn off Nobody Stands <gen>
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
what did you mean debug Triggers ? Im still newbie in editor trying to do harder things :D
Debugging is the easiest thing there is, and it's extremely helpful :D.

You just show messages that might help you discover the problem.
Here's an example:
  • Last Stand 1
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Survivor[2] is dead) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Survivor[2] is dead
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Survivor[3] is dead) Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Survivor[3] is dead
        • Else - Actions
      • (... and so on)
Then you can easily see if all units are really dead according to the trigger.
That's debugging: placing messages in the trigger to find the error.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I just re-read your initial post, and wouldn't something like this work?

  • Actions
    • Set SurvivingPlayers = (SurvivingPlayers - 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • SurvivingPlayers Equal to 1
      • Then - Actions
        • Trigger - Turn off (This trigger)
        • Trigger - Turn on Special Item <gen>
        • Trigger - Turn off Random Drop <gen>
        • Quest - Display to (All players) the Warning message: |cff32cd32YOU ARE T...
        • Countdown Timer - Start Timer as a One-shot timer that will expire in 300.00 seconds
        • Countdown Timer - Create a timer window for Timer with title You will die in
        • Set Timer = (Last started timer)
        • Set Timer_window = (Last created timer window)
        • Trigger - Turn off Nobody Stands <gen>
      • Else - Actions
"SurvivingPlayers" is set to the amount of players at the start (in your case, that's 6).
You subtract 1 each time a player dies. If that value is 1, then only 1 player is alive and the event starts.

It worked for me, and maybe that makes it easier for you as well.
 
Level 6
Joined
Mar 1, 2013
Messages
52
I just re-read your initial post, and wouldn't something like this work?

  • Actions
    • Set SurvivingPlayers = (SurvivingPlayers - 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • SurvivingPlayers Equal to 1
      • Then - Actions
        • Trigger - Turn off (This trigger)
        • Trigger - Turn on Special Item <gen>
        • Trigger - Turn off Random Drop <gen>
        • Quest - Display to (All players) the Warning message: |cff32cd32YOU ARE T...
        • Countdown Timer - Start Timer as a One-shot timer that will expire in 300.00 seconds
        • Countdown Timer - Create a timer window for Timer with title You will die in
        • Set Timer = (Last started timer)
        • Set Timer_window = (Last created timer window)
        • Trigger - Turn off Nobody Stands <gen>
      • Else - Actions
"SurvivingPlayers" is set to the amount of players at the start (in your case, that's 6).
You subtract 1 each time a player dies. If that value is 1, then only 1 player is alive and the event starts.

It worked for me, and maybe that makes it easier for you as well.

Apocalypse could you upload a map with this example for a case ?

Nevermind. Map is completed and fully worked :)
 
Last edited:
Status
Not open for further replies.
Top