• 🏆 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] Mystery Trigger Problem

Status
Not open for further replies.
Level 5
Joined
Sep 11, 2004
Messages
73
Related Triggers to the issue: DESCRIPTION OF ISSUE BELOW TRIGGERS.

  • Option 3
    • Events
    • Conditions
    • Actions
      • Set RightAnswer_Pirate = New Option 3 <gen>
      • Set RevealOptions = 3
      • Unit - Create 1 Coin for Player 7 (Green) at (Center of Option1 <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to Removal_Units
      • Unit - Create 1 Ship for Player 7 (Green) at (Center of Option2 <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to Removal_Units
      • Unit - Create 1 Rum Bottle for Player 7 (Green) at (Center of New Option 3 <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to Removal_Units
      • Unit - Create 1 Jan the Chicken for Player 7 (Green) at (Center of Option4 <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to Removal_Units
      • Unit Group - Pick every unit in (Units in WhatsintheChestZone <gen>) and do (Unit - Unpause (Picked unit))
  • Correct Option 3
    • Events
      • Unit - A unit enters New Option 3 <gen>
    • Conditions
      • (Owner of (Entering unit)) Not equal to Player 7 (Green)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (RightAnswer_Pirate contains (Entering unit)) Equal to True
        • Then - Actions
          • Set MinigamePoints[(Player number of (Owner of (Entering unit)))] = (MinigamePoints[(Player number of (Owner of (Entering unit)))] + 1)
          • Player - Add 1 to (Owner of (Entering unit)) Current gold
          • Wait 0.10 seconds
          • Unit - Move (Entering unit) instantly to (Center of WhatsintheChestStart <gen>)
          • Unit - Pause (Entering unit)
        • Else - Actions
  • Incorrect Option 3
    • Events
      • Unit - A unit enters New Option 3 <gen>
    • Conditions
      • (Owner of (Entering unit)) Not equal to Player 7 (Green)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (RightAnswer_Pirate contains (Entering unit)) Equal to False
        • Then - Actions
          • Wait 0.10 seconds
          • Unit - Move (Entering unit) instantly to (Center of WhatsintheChestStart <gen>)
          • Unit - Pause (Entering unit)
        • Else - Actions
  • Reveal Chest
    • Events
      • Time - PirateTimer expires
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Removal_Units and do (Unit - Remove (Picked unit) from the game)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RevealOptions Equal to 1
        • Then - Actions
          • Game - Display to Minigamers the text: |cffFF8000It's a pi...
          • Unit - Create 1 Captain Booty for Player 7 (Green) at (Center of TreasureSpecial <gen>) facing Default building facing degrees
          • Unit Group - Add (Last created unit) to Removal_Units
          • Animation - Play Treasure Chest 0047 <gen>'s Morph animation
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RevealOptions Equal to 2
        • Then - Actions
          • Game - Display to Minigamers the text: |cffFF8000It's a sh...
          • Unit - Create 1 Ship for Player 7 (Green) at (Center of TreasureSpecial <gen>) facing Default building facing degrees
          • Unit Group - Add (Last created unit) to Removal_Units
          • Animation - Play Treasure Chest 0047 <gen>'s Morph animation
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RevealOptions Equal to 3
        • Then - Actions
          • Game - Display to Minigamers the text: |cffFF8000It's a ru...
          • Unit - Create 1 Rum Bottle for Player 7 (Green) at (Center of TreasureSpecial <gen>) facing 166.00 degrees
          • Unit Group - Add (Last created unit) to Removal_Units
          • Animation - Play Treasure Chest 0047 <gen>'s Morph animation
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RevealOptions Equal to 4
        • Then - Actions
          • Game - Display to Minigamers the text: |cffFF8000It's a co...
          • Unit - Create 1 Coin for Player 7 (Green) at (Center of TreasureSpecial <gen>) facing Default building facing degrees
          • Unit Group - Add (Last created unit) to Removal_Units
          • Animation - Play Treasure Chest 0047 <gen>'s Morph animation
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RevealOptions Equal to 5
        • Then - Actions
          • Game - Display to Minigamers the text: |cffFF8000It's trea...
          • Unit - Create 1 Treasure for Player 7 (Green) at (Center of TreasureSpecial <gen>) facing Default building facing degrees
          • Unit Group - Add (Last created unit) to Removal_Units
          • Animation - Play Treasure Chest 0047 <gen>'s Morph animation
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RevealOptions Equal to 6
        • Then - Actions
          • Game - Display to Minigamers the text: |cffFF8000It's a pi...
          • Unit - Create 1 Pirate Hat for Player 7 (Green) at (Center of TreasureSpecial <gen>) facing Default building facing degrees
          • Unit Group - Add (Last created unit) to Removal_Units
          • Animation - Play Treasure Chest 0047 <gen>'s Morph animation
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RevealOptions Equal to 7
        • Then - Actions
          • Game - Display to Minigamers the text: |cffFF8000It's Jan ...
          • Unit - Create 1 Jan the Chicken for Player 7 (Green) at (Center of TreasureSpecial <gen>) facing Default building facing degrees
          • Unit Group - Add (Last created unit) to Removal_Units
          • Animation - Play Treasure Chest 0047 <gen>'s Morph animation
        • Else - Actions
      • Unit Group - Pick every unit in Removal_Units_2 and do (Unit - Pause (Picked unit))
      • Countdown Timer - Destroy PirateTimer_Window
      • Wait 2.00 seconds
      • Unit Group - Pick every unit in Removal_Units and do (Unit - Remove (Picked unit) from the game)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WITC_Randomizer Equal to 1
          • Whatsinthechest_on Equal to True
        • Then - Actions
          • Trigger - Run Option 1 <gen> (checking conditions)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WITC_Randomizer Equal to 2
          • Whatsinthechest_on Equal to True
        • Then - Actions
          • Trigger - Run Option 2 <gen> (checking conditions)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WITC_Randomizer Equal to 3
          • Whatsinthechest_on Equal to True
        • Then - Actions
          • Trigger - Run Option 3 <gen> (checking conditions)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WITC_Randomizer Equal to 4
          • Whatsinthechest_on Equal to True
        • Then - Actions
          • Trigger - Run Option 4 <gen> (checking conditions)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WITC_Randomizer Equal to 5
          • Whatsinthechest_on Equal to True
        • Then - Actions
          • Trigger - Run Option 5 <gen> (checking conditions)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WITC_Randomizer Equal to 6
          • Whatsinthechest_on Equal to True
        • Then - Actions
          • Trigger - Run Option 6 <gen> (checking conditions)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • WITC_Randomizer Equal to 7
          • Whatsinthechest_on Equal to True
        • Then - Actions
          • Trigger - Run Option 7 <gen> (checking conditions)
        • Else - Actions
      • Animation - Play Treasure Chest 0047 <gen>'s stand animation
      • Special Effect - Destroy Pirate_Effect
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Whatsinthechest_on Equal to True
        • Then - Actions
          • Countdown Timer - Start PirateTimer as a One-shot timer that will expire in 10.00 seconds
          • Countdown Timer - Create a timer window for (Last started timer) with title Chest Revealed:
          • Set PirateTimer_Window = (Last created timer window)
        • Else - Actions

So we have a minigame in which you have 4 foot switches each with an option on them and a chest sitting on a little island. The minigame works like this: 60 seconds long, 12 seconds in-between each chest reveal, 10 seconds to pick an option, 3 being wrong, one being right. The triggers above are what relate to option 3 - our problem option. It is EXACTLY the same as all the other triggers, except the fact that it uses the region New Option 3 which is also no different from the other 3 regions. NOTE: The top-most trigger is being force-run by the minigame setup.

Our issue is: When a unit enters this region, when it is set to be the correct region, they are not gettting the gold or points, but are getting moved back correctly and paused. However all of the other options, etc, work, and they are all exactly the same setup as these.

Our question is: WTF IS GOING ON? Why can a singular region not work? We've tried the following: replacing our old region (option 3) with (new option 3). Deleting triggers, and remaking them from scratch. Moving the region slightly off the foot switch area. We also thought it was the unit being spawned on top of the region, so we replaced it with floating text, still didn't work.

If you need further information or more triggers posted up i can do that, thank you.
 
Level 6
Joined
Feb 2, 2005
Messages
205
Ow thats a damn big Trigger, first of all it leaks a lot. You could check for the right answer in the Trigger Conditions, that will save you the if. I'm not sure what the standart for multipile conditions is, but i would add an AND - Mulitiple Conditions. I runned in some trouble with Trigger where multiple Conditions where asked and it fired always wrong. Adding AND to it will force the game to have both conditions true. (reffering to those bottem ifs in the Reveal Chest Trigger)

  • Correct Option 3
    • Events
      • Unit - A unit enters New Option 3 <gen>
    • Conditions
      • AND - Mulitiple Conditions
        • (Owner of (Entering unit)) Not equal to Player 7 (Green)
        • (RightAnswer_Pirate contains (Entering unit)) Equal to True
    • Actions
      • Set MinigamePoints[(Player number of (Owner of (Entering unit)))] = (MinigamePoints[(Player number of (Owner of (Entering unit)))] + 1)
      • Player - Add 1 to (Owner of (Entering unit)) Current gold
      • Wait 0.10 seconds
      • Unit - Move (Entering unit) instantly to (Center of WhatsintheChestStart <gen>)
      • Unit - Pause (Entering unit)
The Problem could be that the Trigger is that long. Did you try to add Debugging Message for analysing if it is Triggering Correctly? If you add some Gamemessages to the then actions of the Ifs so you can see ingame which one is taken.

Beside the leaks in your Trigger it looks fine to me
 
Level 5
Joined
Sep 11, 2004
Messages
73
The trigger isn't too long, because we have a trigger that is even worse than this one. This one is only about 50-ish? The other one we have is about 200, and that one works fine. So the problem isn't in the length of the trigger, it's the trigger itself.

We have tried the gamemessages and that does work for all we know, otherwise we're not putting them in the right Then condition.

As for leaks go, I see your point, and will try it. The thing is though, does that mean the other 3 options that are created exactly the same as this problem trigger leaking too? If it is, why are they working like they're suppose to and not this one? It just seems rather random that out of 1 through 4 that number 3 doesn't work.

Thanks for the help, much appreciated. :); will post updates upon the issue soon.
 
Status
Not open for further replies.
Top