Problem With Selection and Timers

Kenak

New Member
Reaction score
3
I've been working on a project with a friend for the past 3 weeks, and after doing to terrain and basic triggers, I need some help with the Class Selection System. Here is what I want (not what I'm requesting):

When you start, the screen is all Black and each player can press "Esc" to bring up the class menu, and "Esc" again to close it. The menu is 3 different Dialog boxes that each have 3 buttons: "Select", "Next", and "Back". Each Dialog also should have text on it to describe each of the Classes, and once it's selected it displays to each ally the name of the Class so they know which classes have been chosen so it can help them choose. Then while this is going on, a Countdown Timer starts up for 1 minute. Once all players are done choosing (before the 1 minute), the timer stops, the screen fades back to normal, and the game starts. If everybody is not done yet, and the timer gets to 0, everybody gets a Warrior.

Now what my problem is that I cannot figure out a way to make them game start when everybody has chosen their hero OR when the timer runs out. And when the timer does run out and somebody does not have a hero, they get the warrior. If somebody could give me a trigger or help me with a trigger I would greatly appreciate it!

Another problem I have is with my Dialog Box: I cannot figure out how to put text in it. I have seen it done before, but this is not nessecary, as I don't have to give a description, it just helps.

So, can anybody help me? =) Thanks ahead of time!
 

hell_knight

Playing WoW
Reaction score
126
read the tutoral to make dialogs and stuff just make another trigger set for 60 secs and then turn off the dialog trigger.
 

Kenak

New Member
Reaction score
3
You obviously did not read what I was asking, or I was not clear enough. I know how to make dialogs and if it were as easy as just having a timer end and turning off the dialog, I would have done it. I took time to word what I wanted so it would be clear, to avoid this >.<

I will quote what I want just to be even more clear =):

Now what my problem is that I cannot figure out a way to make them game start when everybody has chosen their hero OR when the timer runs out. And when the timer does run out and somebody does not have a hero, they get the warrior. If somebody could give me a trigger or help me with a trigger I would greatly appreciate it!

- I can make the dialog that creates the 3 heroes.
- I can create the timer that lasts a minute.
- I cannot figure out a way to see if a player has chosen a hero, and if all have before the timer runs out, it stops.

Understand now? You have a maximum of 1 minute to choose, and if not you get a Warrior. If everybody does choose before the time runs out, the timer stops and the game starts.
 

Kenak

New Member
Reaction score
3
I still need some help =( Sorry to double post and bump so early, but I really need this answerd soon please =)
 
M

Master_Saji

Guest
Hmmmmmm............ :(

Maybe check out the Hero Taverns Tutorial?
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
Ok so you only problem is to se when all players have choosen a hero?

Make a integer varialbe at map init do like this

Code:
Set Variable = (Number of players in (All players matching ((((Matching player) controller) Equal to User) and (((Matching player) slot status) Equal to Is playing))))

When a player choose a hero set Variable = Variable - 1 and when Variable is 0 all players has choosen there hero. Then stop/pause the timer, destroy the timer window (if any), fadeout and turn off the hero selection trigger.
 

Kenak

New Member
Reaction score
3
Thank you! I will try that right now.

EDIT: Btw, I know how to get the Dialog to work. I do not have a problem with making Dialogs and Selecting heroes. If I can get that trigger to work, it would answer my problem perfectly: Detecting if a hero has been chosen.

EDIT: How do I detect when the Variable is = 0?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> How do I detect when the Variable is = 0?

Right after subtracting 1, you add an "IF THEN ELSE", with an integer comparison as condition.
 
S

Soronius

Guest
make a trigger thatn runs every few sec and do IF the var is ... then...
 

Jazradel

Helping people do more by doing less.
Reaction score
102
Create a trigger on Map Initialization that creates a 60 one shot timer and a 1 second repeating timer.

To detect if all the heros have been chosen you would probably have to have a trigger on a repeating timer that checks if a variable(boolean) for each player(originally false but set to true when a player chooses a hero) is true. Then get it to run your game start triggers.

Have another trigger that is on a one shot timer which detects whether each player has chosen a hero or not(using the variable above) and creates a warrior if it's false. Then get it to run your game start triggers.

You game start triggers should include something that turns off the dialog triggers, the triggers above and the timers.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top