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

[Trigger] whats wrong with my trigger?

Status
Not open for further replies.
Level 11
Joined
Nov 12, 2006
Messages
765
sorry couldn't think of a better title for this thread, anyways in my trigger the host, player 1, has a "sprinter" unit within a small confined space on the map. When the unit enters the first or second region (easy or medium) it works correctly, however i cant for the life of me figure out why it doesn't work for the hard region *3ed one*. And whenever the sprinter runs into the hard region, it selects the last "else" trigger. the easy medium hard and default all display different text.

  • Events
    • Unit - A unit enters Choose Easy <gen>
    • Unit - A unit enters Choose Medium <gen>
    • Unit - A unit enters Choose Hard <gen>
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Choose Easy <gen> contains (Entering unit)) Equal to True
      • Then - Actions
        • Set DifficultyLevel = 1
        • Set ChooseDifficulty = True
        • Game - Display to (All players) the text: |cffff9900Difficult...
        • Unit - Remove (Entering unit) from the game
        • Trigger - Run Check Go <gen> (checking conditions)
        • Trigger - Turn off (This trigger)
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Choose Medium <gen> contains (Entering unit)) Equal to True
          • Then - Actions
            • Set DifficultyLevel = 2
            • Set ChooseDifficulty = True
            • Game - Display to (All players) the text: |c00540081Difficult...
            • Unit - Remove (Entering unit) from the game
            • Trigger - Run Check Go <gen> (checking conditions)
            • Trigger - Turn off (This trigger)
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Choose Hard <gen> contains (Entering unit)) Equal to True
              • Then - Actions
                • Set DifficultyLevel = 3
                • Set ChooseDifficulty = True
                • Game - Display to (All players) the text: |c00959697Difficult...
                • Unit - Remove (Entering unit) from the game
                • Trigger - Run Check Go <gen> (checking conditions)
                • Trigger - Turn off (This trigger)
              • Else - Actions
                • Set DifficultyLevel = 2
                • Set ChooseDifficulty = True
                • Unit - Remove Sprinter 0029 <gen> from the game
                • Game - Display to (All players) the text: |c00540081Difficult...
                • Trigger - Run Check Go <gen> (checking conditions)
                • Trigger - Turn off (This trigger)
the final else trigger is there is because after 20 seconds if nothing is chosen, the trigger is run, which successfully picks the final else trigger (difficulty level=2).
 
Level 13
Joined
Jun 23, 2009
Messages
300
I don't have a clue about what's wrong from the trigger, however try this way:

  • Events
    • Unit - A unit enters Choose Easy <gen>
    • Unit - A unit enters Choose Medium <gen>
    • Unit - A unit enters Choose Hard <gen>
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Choose Easy <gen> contains (Entering unit)) Equal to True
      • Then - Actions
        • Set DifficultyLevel = 1
        • Set ChooseDifficulty = True
        • Game - Display to (All players) the text: |cffff9900Difficult...
        • Unit - Remove (Entering unit) from the game
        • Trigger - Run Check Go <gen> (checking conditions)
        • Trigger - Turn off (This trigger)
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Choose Medium <gen> contains (Entering unit)) Equal to True
          • Then - Actions
            • Set DifficultyLevel = 2
            • Set ChooseDifficulty = True
            • Game - Display to (All players) the text: |c00540081Difficult...
            • Unit - Remove (Entering unit) from the game
            • Trigger - Run Check Go <gen> (checking conditions)
            • Trigger - Turn off (This trigger)
          • Else - Actions
            • Set DifficultyLevel = 3
            • Set ChooseDifficulty = True
            • Game - Display to (All players) the text: |c00959697Difficult...
            • Unit - Remove (Entering unit) from the game
            • Trigger - Run Check Go <gen> (checking conditions)
            • Trigger - Turn off (This trigger)
If it doesn't work, then the problem must be in the regions :razz:
 
Status
Not open for further replies.
Top