• 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] Trigger isn't comprehending

Status
Not open for further replies.
Level 4
Joined
Aug 2, 2007
Messages
69
Okay, here's the problem. I've introduced the variables of dialog buttons in my map and I've managed to fix EVERY single annoying problem except for this one. Basically when you start the game, the dialog box appears for player 1. If either dialog buttons 1 or 2 are clicked, a timer that repeats for 40 seconds and a scoreboard appear. Now here is where my problem occurs. There is a trigger that I have set up that will ask a random question every 40 seconds, and it worked perfectly before I introduced dialog to choose modes.

For example: If I don't click the dialog button until 5 seconds after the box appears, it'll ask the questions with 5 seconds before its supposed to synchronize with the countdown timer.

Here is what I have for the Speed of Questions Trigger that follow with dialog:

  • Turn Off Classic
  • Events
  • Map initialization
  • Conditions
  • Actions
  • Trigger - Turn off Speed of Questions Classic <gen>
  • Turn On Classic
  • Events
  • Dialog - A dialog button is clicked for Dialog_Var
  • Conditions
  • (Clicked dialog button) Equal to Dialog_Button_1
  • Actions
  • Trigger - Turn on Speed of Questions Classic <gen>
The same triggers are for "Speed of Questions Points" and Dialog_Button_2.
The 2 dialog buttons determine which play style you are using.

This may be the problem and I have no idea how to fix it.

  • Speed of Questions Classic
  • Events
  • Time - Every 40.00 seconds of game time
  • Conditions
The Action triggers basically just activate the random question and give the answer to the question 15 seconds later.
 
Level 4
Joined
Aug 2, 2007
Messages
69
are you using the same dialog for the questions and the modes?

  • Dialog Modes
  • Events
  • Time - Elapsed game time is 1.40 seconds
  • Conditions
  • Actions
  • Dialog - Change the title of Dialog_Var to Choose Mode
  • Dialog - Create a dialog button for Dialog_Var labelled Classic Mode
  • Set Dialog_Button_1 = (Last created dialog button)
  • Dialog - Create a dialog button for Dialog_Var labelled Points Mode
  • Set Dialog_Button_2 = (Last created dialog button)
  • Dialog - Show Dialog_Var for Player 1 (Red)
 
Level 5
Joined
Jan 15, 2007
Messages
199
do u use the same dialog, Dialog_Var for the questions tho?, cause if you do, you should change that, or they could run at the same time and glitch
 
Level 4
Joined
Aug 2, 2007
Messages
69
do you mean this trigger?

  • Questions and Answers
  • Events
  • Map initialization
  • Conditions
  • Actions
  • Set randomquestions = (Random integer number between 1 and 210)
  • Set Question(1) = Who is the main character of the anime?
  • Set Answer(1) = naruto
etc. etc.
 
Level 4
Joined
Aug 2, 2007
Messages
69
you dont click for the answer, you type it. but if this helps

  • Speed of Questions Classic
  • Events
  • Time - Every 40.00 seconds of game time
  • Conditions
  • Actions
  • Player Group - Pick every player in (All players) and do (Set spelers[(Player number of (Picked player))] = 0)
  • Unit - Make Kakashi 002 <gen> face (Center of hierheen kijken <gen>) over 1.00 seconds
  • Cinematic - Clear the screen of text messages for (All players)
  • Sound - Play Hint <gen>
  • Game - Display to (All Players) for 15.00 seconds the text: (lc00ffff00 + (Question[randomquestions] + lr))
  • Trigger - Turn on Intypen 1 Classic <gen>
  • Trigger - Turn on Intypen 2 Classic <gen>
  • Trigger - Turn on Intypen 3 Classic <gen>
  • Trigger - Turn on Intypen 4 Classic <gen>
  • Trigger - Turn on Intypen 5 Classic <gen>
  • Trigger - Turn on Intypen 6 Classic <gen>
  • Trigger - Turn on Intypen 7 Classic <gen>
  • Trigger - Turn on Intypen 8 Classic <gen>
  • Trigger - Turn on Intypen 10 Classic <gen>
  • Trigger - Turn on Intypen 11 Classic <gen>
  • Trigger - Turn on Intypen 12 Classic <gen>
  • Game - Display to (All Players) for 3.00 seconds the text: Read carefully... y...
  • Wait 15.00 seconds
  • Trigger - Turn off Intypen 1 Classic <gen>
  • Trigger - Turn off Intypen 2 Classic <gen>
  • Trigger - Turn off Intypen 3 Classic <gen>
  • Trigger - Turn off Intypen 4 Classic <gen>
  • Trigger - Turn off Intypen 5 Classic <gen>
  • Trigger - Turn off Intypen 6 Classic <gen>
  • Trigger - Turn off Intypen 7 Classic <gen>
  • Trigger - Turn off Intypen 8 Classic <gen>
  • Trigger - Turn off Intypen 10 Classic <gen>
  • Trigger - Turn off Intypen 11 Classic <gen>
  • Trigger - Turn off Intypen 12 Classic <gen>
  • Sound - Play GoodJob <gen>
  • Game - Display to (All Players) the text: (The answer was: + (lr00ffff00 + (Answer[randomquestions] + lr)) + <Empty String>))
  • If (spelers[1] Equal to 0) then do (Unit Group - Pick every unit in (Units in(Playable map area) owned by Player 1 (Red)) and do (Unit - Make (Picked Unit) Vulnerable)) else (Do nothing)
  • Set randomquestions = (Random integer number between 1 and 210)
The speler[1] set trigger thats in there goes from players 1-12 excluding 9.

@PurplePoot - I tried disabling the trigger in the fashion u explained, but that didnt make a difference. The same problem kept occuring, I wait 3 seconds to push button_2 + the time it takes for the dialog appear for player 1 = the time the questions delay from appearing with the timer.
 
Level 4
Joined
Aug 2, 2007
Messages
69
the trigger you see above is the one that is disabled.

Hmm, brainstorm, instead of manipulating this time. Is there a way to manipulate the countdown timer so it starts synchronizes with speed of questions rather than vice versa which is what we were discussing.

but its weird because i have it so the timer starts after someone clicks button_1 or button_2. and for some reason trigger "Speed of Questions" ignores the other trigger of turning on or even when to turn on.
 
Level 5
Joined
Jan 15, 2007
Messages
199
oh... i know your problem. the
  • Time - Every 40.00 seconds of game time
is every 40 seconds from the start of the game, not from while this trigger is initialized. This happens because the Every Whatever of game time and At Whatever of game time runs of a generic timer run in the game, it will not create a seperate timer just for that trigger
Replace it with a loop with a 40 second polled wait or a timer that goes for 40 seconds
 
Level 5
Joined
Jan 15, 2007
Messages
199
  • Run Timer
    • Events
    • Conditions
    • Actions
      • Countdown Timer - Create a timer window for QuestionTimer with title Next Question
      • Set TWindow = (Last created timer window)
      • Countdown Timer - Start QuestionTimer as a Repeating timer that will expire in 40.00 seconds
is the first trigger and

  • TimerExpires
    • Events
      • Time - QuestionTimer expires
    • Conditions
    • Actions
      • -------- Ask Questions... Blah Blah Blah --------
is the other

there are also two variables
1 - (Name) Question Timer - (Type) Timer
2 - (Name) TWindow - (Type) Timer Window

Right now TWindow does nothing but i added it incase you needed to destroy it later.
Also, to get this working, change
  • Trigger - Turn on Speed of Questions Classic <gen>
to
  • Trigger - Run Run Timer <gen> (ignoring conditions)
and change
  • Trigger - Turn off Speed of Questions Classic <gen>
to
  • Countdown Timer - Pause QuestionTimer
 
Status
Not open for further replies.
Top