• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Need advanced bug fixers!

Status
Not open for further replies.
Level 12
Joined
Mar 10, 2008
Messages
869
Yeah, I fixed the pay to get out of jail bug in 1.6e lol...

For making the game faster, use SPEED GEAR (program), else I will create a speed modifier later. I just need these bugs to be fixed, like this one:

Strange bug, I have no bloody idea why it happens.
Here's what happens: Someone rolls a DOUBLE 5. Game says: (Name) has rolled a DOUBLE 5!..
Some time along their turn... the game says that they roll a 5, which causes all kinds of different bugs to happen!? Why the hell does it roll a 5 again?

Here's my Roll Trigger (Same for each player)
  • RedTurn
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 1 (Red) controller) Equal to User
          • (Player 1 (Red) slot status) Equal to Is playing
          • (Player 1 (Red) is in Players) Equal to True
        • Then - Actions
          • Set NextTurn = False
          • Unit - Change ownership of Your Turn 0029 <gen> to Player 1 (Red) and Change color
          • Unit - Change ownership of Have the Dice in your hand 0034 <gen> to Player 1 (Red) and Change color
          • Game - Display to (All players) the text: ((It's now + (Name of Player 1 (Red))) + 's turn.)
        • Else - Actions
          • Trigger - Run BlueTurn <gen> (checking conditions)
And
  • RedRoll
    • Events
      • Unit - A unit owned by Player 1 (Red) Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Throw Dice
    • Actions
      • Unit - Change ownership of Have the Dice in your hand 0034 <gen> to Player 12 (Brown) and Change color
      • Set Dice1 = (Random integer number between 1 and 6)
      • Set Dice2 = (Random integer number between 1 and 6)
      • Set DiceRollNumber = (Dice1 + Dice2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • JailTime[1] Greater than 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Dice1 Equal to Dice2
            • Then - Actions
              • Game - Display to (All players) the text: (((Name of Player 1 (Red)) + has rolled a DOUBLE ) + ((String(Dice1)) + and has gotten out of jail!))
              • Set JailTime[1] = 0
              • Wait 1.00 seconds
              • Unit - Move PlayerUnit[1] instantly to (Center of Just Visiting Jail <gen>)
              • Cinematic - Ping minimap for (All players) at (Position of PlayerUnit[1]) for 1.00 seconds
              • Wait until (NextTurn Equal to True), checking every 1.00 seconds
              • Trigger - Run BlueTurn <gen> (ignoring conditions)
            • Else - Actions
              • Set JailTime[1] = (JailTime[1] - 1)
              • Game - Display to (All players) the text: ((Name of Player 1 (Red)) + didn't roll a double.)
              • Wait 1.00 seconds
              • Game - Display to (All players) the text: (((Name of Player 1 (Red)) + has ) + ((String(JailTime[1])) + more turn(s) in jail.))
              • Wait 1.00 seconds
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • JailTime[1] Equal to 0
                • Then - Actions
                  • Unit - Move PlayerUnit[1] instantly to (Center of Just Visiting Jail <gen>)
                  • Cinematic - Ping minimap for (All players) at (Position of PlayerUnit[1]) for 1.00 seconds
                  • Game - Display to (All players) the text: ((Name of Player 1 (Red)) + has been let out of jail.)
                  • Wait until (NextTurn Equal to True), checking every 1.00 seconds
                  • Trigger - Run BlueTurn <gen> (ignoring conditions)
                • Else - Actions
              • Trigger - Run BlueTurn <gen> (ignoring conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Dice1 Equal to Dice2
            • Then - Actions
              • Game - Display to (All players) the text: (((Name of Player 1 (Red)) + just rolled a DOUBLE ) + ((String(Dice1)) + !))
              • Set DoubleArresting[1] = (DoubleArresting[1] + 1)
              • Wait 1.00 seconds
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • DoubleArresting[1] Greater than or equal to 3
                • Then - Actions
                  • Set DoubleArresting[1] = 0
                  • Game - Display to (All players) the text: ((Name of Player 1 (Red)) + has been caught |c00ff0000speeding|r and has been sent to jail.)
                  • Wait 1.00 seconds
                  • Set JailTime[1] = 3
                  • Unit - Move PlayerUnit[1] instantly to (Center of Jail <gen>)
                  • Cinematic - Ping minimap for (All players) at (Position of PlayerUnit[1]) for 1.00 seconds
                  • Trigger - Run BlueTurn <gen> (ignoring conditions)
                • Else - Actions
                  • Set MovingUnit = PlayerUnit[1]
                  • Set Moving = True
                  • Trigger - Run Move <gen> (ignoring conditions)
                  • Wait until (NextTurn Equal to True), checking every 1.00 seconds
                  • Trigger - Run RedTurn <gen> (ignoring conditions)
            • Else - Actions
              • Game - Display to (All players) the text: (((Name of Player 1 (Red)) + just rolled a ) + ((String(DiceRollNumber)) + .))
              • Set DoubleArresting[1] = 0
              • Wait 1.00 seconds
              • Set MovingUnit = PlayerUnit[1]
              • Set Moving = True
              • Trigger - Run Move <gen> (ignoring conditions)
              • Wait until (NextTurn Equal to True), checking every 1.00 seconds
              • Trigger - Run BlueTurn <gen> (ignoring conditions)
If this is fixed, the whole game should run PERFECTLY!

The game is Mnopoly. (See in my signature)

Please help me!:sad:
 
Level 13
Joined
Sep 14, 2008
Messages
1,408
Let me give you a general programming tip:

Do not write huge methods (here triggers) which nobody understands in the end.

Write different trigger like:

1. The one which choses random numbers and has the "if"
2. the other ones which are started by "trigger - run" in the "if" of the first one.
 
Level 12
Joined
Jul 27, 2008
Messages
1,181
Center of region is Point (location) though. And that leaks big time.

EDIT:
Let me give you a general programming tip:

Do not write huge methods (here triggers) which nobody understands in the end.

Write different trigger like:

1. The one which choses random numbers and has the "if"
2. the other ones which are started by "trigger - run" in the "if" of the first one.

Might be good in C++/Java/Whatever, with inlining and preprocessors. (In vJASS too)

But in plain ol' JASS it's no good. (GUI == JASS for me)
 
Level 15
Joined
Sep 3, 2006
Messages
1,738
Yes, ok that makes sense I guess (points leaking in regions). I was thinking more along the lines of just regions, guess I was wrong.

There's no point in separating it into multiple triggers in GUI. It looks and does the same no matter what.
 
Status
Not open for further replies.
Top