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

Bug or what?!

Status
Not open for further replies.
Level 9
Joined
Apr 28, 2009
Messages
538
I've always had a problem whenever I wanted to make a trigger that gives a bonus of 50 gold to a player when he's current gold becomes 450 (or whatever number you like)

Until today, I thought that there's something wrong with my understanding of how triggers work, that my poor GUI skills are responsible for the game crashes.

But this time, I really am sure there's just nothing wrong with the trigger, so I'm asking you: Is this some kind of bug, or I still suck at triggering?

Here's the trigger:


  • Gold Bonus on 450 Gold
    • Events
      • Player - Player 1 (Red)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 2 (Blue)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 3 (Teal)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 4 (Purple)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 5 (Yellow)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 6 (Orange)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 7 (Green)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 8 (Pink)'s Current gold becomes Greater than or equal to 450.00
    • Conditions
    • Actions
      • Sound - Play QuestNew <gen>
      • Game - Display to (All players) for 5.00 seconds the text:
      • Game - Display to (All players) for 10.00 seconds the text: ((Name of (Triggering player)) +...
      • -------- -------------------------- --------
      • Player - Add 30 to (Triggering player) Current gold
      • -------- -------------------------- --------
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • ((Triggering player) is in WestGroup) Equal to (==) True
          • Then - Actions
            • Player Group - Pick every player in WestGroup and do (Actions)
              • Loop - Actions
                • Player - Add 20 to (Picked player) Current gold
          • Else - Actions
            • Player Group - Pick every player in EstGroup and do (Actions)
              • Loop - Actions
                • Player - Add 20 to (Picked player) Current gold
      • -------- -------------------------- --------
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
 
Level 9
Joined
Apr 28, 2009
Messages
538
no, i use "Custom script: call DestroyTrigger(GetTriggeringTrigger())" on a lots of triggers. I am 100% sure the last "line" has nothing to do with the crashes.
 
Level 9
Joined
Apr 28, 2009
Messages
538
  • Gold Bonus on 450 Gold
    • Events
      • Player - Player 1 (Red)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 2 (Blue)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 3 (Teal)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 4 (Purple)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 5 (Yellow)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 6 (Orange)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 7 (Green)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 8 (Pink)'s Current gold becomes Greater than or equal to 450.00
    • Conditions
    • Actions
      • Sound - Play QuestNew <gen>
      • Game - Display to (All players) for 5.00 seconds the text:
      • Game - Display to (All players) for 10.00 seconds the text: ((Name of (Triggering player))...
      • -------- -------------------------- --------
      • Player - Add 30 to (Triggering player) Current gold
      • -------- -------------------------- --------
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())

The same result, the game still crashes.
 
Level 9
Joined
Apr 28, 2009
Messages
538
  • Gold Bonus on 450 Gold
    • Events
      • Player - Player 1 (Red)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 2 (Blue)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 3 (Teal)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 4 (Purple)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 5 (Yellow)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 6 (Orange)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 7 (Green)'s Current gold becomes Greater than or equal to 450.00
      • Player - Player 8 (Pink)'s Current gold becomes Greater than or equal to 450.00
    • Conditions
    • Actions
      • Player - Add 30 to (Triggering player) Current gold
The game still crashes.
 
Level 9
Joined
Apr 28, 2009
Messages
538
no dude, the game only crashes when this trigger is enabled, I've said that in the first post.

Of course I've checked if it's the trigger's fault.
 
Level 5
Joined
May 3, 2009
Messages
129
ye just turn off the trigger befor you give the gold = stops the loop
like so
  • Gold Bonus on 450 Gold
  • Events
  • Player - Player 1 (Red)'s Current gold becomes Greater than or equal to 450.00
  • Player - Player 2 (Blue)'s Current gold becomes Greater than or equal to 450.00
  • Player - Player 3 (Teal)'s Current gold becomes Greater than or equal to 450.00
  • Player - Player 4 (Purple)'s Current gold becomes Greater than or equal to 450.00
  • Player - Player 5 (Yellow)'s Current gold becomes Greater than or equal to 450.00
  • Player - Player 6 (Orange)'s Current gold becomes Greater than or equal to 450.00
  • Player - Player 7 (Green)'s Current gold becomes Greater than or equal to 450.00
  • Player - Player 8 (Pink)'s Current gold becomes Greater than or equal to 450.00
  • Conditions
  • Actions
  • -------------------------
  • Trigger - Turn off (This trigger)
  • -------------------------
    • Sound - Play QuestNew <gen>
    • Game - Display to (All players) for 5.00 seconds the text:
    • Game - Display to (All players) for 10.00 seconds the text: ((Name of (Triggering player)) +...
    • -------- -------------------------- --------
    • Player - Add 30 to (Triggering player) Current gold
    • -------- -------------------------- --------
    • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • ((Triggering player) is in WestGroup) Equal to (==) True
    • Then - Actions
    • Player Group - Pick every player in WestGroup and do (Actions)
    • Loop - Actions
    • Player - Add 20 to (Picked player) Current gold
    • Else - Actions
    • Player Group - Pick every player in EstGroup and do (Actions)
    • Loop - Actions
    • Player - Add 20 to (Picked player) Current gold
    • -------- -------------------------- --------
    • Custom script: call DestroyTrigger(GetTriggeringTrigger())
 
Status
Not open for further replies.
Top