1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Trigger] Mystery Trigger Problem

Discussion in 'Triggers & Scripts' started by Xsilver07, Aug 27, 2007.

  1. Xsilver07

    Xsilver07

    Joined:
    Sep 11, 2004
    Messages:
    70
    Resources:
    4
    Maps:
    4
    Resources:
    4
    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.
     
  2. Rui

    Rui

    Joined:
    Jan 7, 2005
    Messages:
    8,502
    Resources:
    8
    Maps:
    8
    Resources:
    8
    Seems like you're not getting help here so... I'll move this to the Triggers (GUI) Forum.

    ~Thread Moved
     
  3. penny89108

    penny89108

    Joined:
    Aug 20, 2007
    Messages:
    20
    Resources:
    1
    Maps:
    1
    Resources:
    1
    O_O ok im not that good
     
  4. Xelephant

    Xelephant

    Joined:
    Feb 2, 2005
    Messages:
    215
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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
     
  5. Xsilver07

    Xsilver07

    Joined:
    Sep 11, 2004
    Messages:
    70
    Resources:
    4
    Maps:
    4
    Resources:
    4
    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.
     
  6. Xsilver07

    Xsilver07

    Joined:
    Sep 11, 2004
    Messages:
    70
    Resources:
    4
    Maps:
    4
    Resources:
    4
    Attempted using the "And" conditions and it didn't work :( looks like i gotta try somethin new.

    EDIT: original idea, stripped, reworked, and new idea works. :D thanks though godless.
     
    Last edited: Aug 28, 2007
  7. Xelephant

    Xelephant

    Joined:
    Feb 2, 2005
    Messages:
    215
    Resources:
    1
    Maps:
    1
    Resources:
    1
    np, the leaks dosnt make you trigger go crazy, they just fill up some memory space and will add up in time, on slow computers it will come to horrible lags to disconnects, so we try to fix it with Costume Script and Varibales. If you havn't red already, have a look here

    http://www.hiveworkshop.com/forums/showthread.php?t=35124

    It also contains how to fix leaks