• 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] Roll Command

Status
Not open for further replies.
Level 4
Joined
Sep 25, 2009
Messages
49
Well im still a newbie =P and i can't figure out how to fix this....

  • Roll
    • Events
      • Player - Player 1 (Red) types a chat message containing -roll as A substring
      • Player - Player 2 (Blue) types a chat message containing -roll as A substring
      • Player - Player 3 (Teal) types a chat message containing -roll as A substring
      • Player - Player 4 (Purple) types a chat message containing -roll as A substring
    • Conditions
    • Actions
      • Leaderboard - Create a leaderboard for (All players) titled (Substring((Entered chat string), 1, (Length of (Entered chat string))))
      • Leaderboard - Add (Triggering player) to (Last created leaderboard) with label (Name of (Triggering player)) and value (Random integer number between 1 and 100)
      • Wait 20.00 seconds
      • Leaderboard - Destroy (Last created leaderboard)
Its probably something simple that i didn't think of but w\e... when people roll they are able to keep rolling without it pausing the trigger.... and turn off trigger wouldn't work cause other people couldn't roll if that we're to happen...so.... =\
 
Level 9
Joined
Dec 17, 2008
Messages
312
Well im still a newbie =P and i can't figure out how to fix this....

  • Roll
    • Events
      • Player - Player 1 (Red) types a chat message containing -roll as A substring
      • Player - Player 2 (Blue) types a chat message containing -roll as A substring
      • Player - Player 3 (Teal) types a chat message containing -roll as A substring
      • Player - Player 4 (Purple) types a chat message containing -roll as A substring
    • Conditions
    • Actions
      • Leaderboard - Create a leaderboard for (All players) titled (Substring((Entered chat string), 1, (Length of (Entered chat string))))
      • Leaderboard - Add (Triggering player) to (Last created leaderboard) with label (Name of (Triggering player)) and value (Random integer number between 1 and 100)
      • Wait 20.00 seconds
      • Leaderboard - Destroy (Last created leaderboard)
Its probably something simple that i didn't think of but w\e... when people roll they are able to keep rolling without it pausing the trigger.... and turn off trigger wouldn't work cause other people couldn't roll if that we're to happen...so.... =\

Create a new trigger using:

  • RollTimer
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set timer_integer = (timer_integer + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • timer_integer Equal to 20
        • Then - Actions
          • Set timer_integer = 0
          • Trigger - Turn on Roll <gen>
          • Leaderboard - Destroy (Roll_Board)
          • For each (Integer A) from 1 to 4, do (Actions)
            • Loop - Actions
              • Set Player_Rolled[(Integer A)] = False
          • Trigger - Turn off (RollAdd)
          • Trigger - Turn off (This trigger)
        • Else - Actions
Modify your old trigger:

  • Roll
    • Events
      • Player - Player 1 (Red) types a chat message containing -roll as A substring
      • Player - Player 2 (Blue) types a chat message containing -roll as A substring
      • Player - Player 3 (Teal) types a chat message containing -roll as A substring
      • Player - Player 4 (Purple) types a chat message containing -roll as A substring
    • Conditions
    • Actions
      • set Player_Rolled(Player number of(Triggering player) = True
      • Leaderboard - Create a leaderboard for (All players) titled (Substring((Entered chat string), 1, (Length of (Entered chat string))))
      • set Roll_Board = (Last created leaderboard)
      • Leaderboard - Add (Triggering player) to (Roll_Board) with label (Name of (Triggering player)) and value (Random integer number between 1 and 100)
      • Trigger - Turn on (RollTimer)
      • Trigger - Turn on (RollAdd)
      • Trigger - Turn off (This trigger)
Finally: Add a trigger that adds to the board.

  • RollAdd
    • Events
      • Player - Player 1 (Red) types a chat message containing -roll as A substring
      • Player - Player 2 (Blue) types a chat message containing -roll as A substring
      • Player - Player 3 (Teal) types a chat message containing -roll as A substring
      • Player - Player 4 (Purple) types a chat message containing -roll as A substring
    • Conditions
      • Player_Rolled(Player number of(Triggering player) = False
    • Actions
      • set Player_Rolled(Player number of(Triggering player) = True
      • Leaderboard - Add (Triggering player) to (Roll_Board) with label (Name of (Triggering player)) and value (Random integer number between 1 and 100)
Variables:

Roll_Board (leaderboard)
Player_Rolled (boolean)
timer_integer (integer)
 
Last edited:
Level 4
Joined
Sep 25, 2009
Messages
49
Uhhh.... not quite sure how you got the "Trigger - Turn on (RollTimer) Checking Conditions" on the second trigger, the most i can get it to is "Trigger - Turn on Roll Timer <gen>"
 
Level 4
Joined
Sep 25, 2009
Messages
49
RollAdd does the exact same thing as just Roll, Whats the point in RollAdd cause i disabled RollAdd and it worked perfectly....?
 
Status
Not open for further replies.
Top