| 07-03-2003, 08:59 PM | #1 |
Ok. The goal here is to set up a voting system to either watch of skip the intro to my map. So far I have it so if each player types a certain thread then it will set an integer variable. If the variable is set to 1 then it means skip the intro and if its set to 2 then it means watch the intro. Well I have that part down, but I don't know how to make it so it checks and sees how many people voted skip and how many ppl voted watch. If more players interger variable is equal to 1 then it skips the intro and if more players interger variable is qual to 2 then it watches the intro. That's what I need to accomplish. Anyone know?? |
| 07-03-2003, 09:05 PM | #2 |
This is NOT a advanced trigger. Infact we would call it a noobi question.:bgrun: 2 variables + 1 per player 1) count the number of yes votes 2) count the number of no votes 3) a boolean variable for each player (or array) that tells if they have voted yet 4) compiar the larger of 1 and 2 that show or dont show cinimatic For this kind of thing you should use dialogs but chat commands will work. |
| 07-03-2003, 09:05 PM | #3 |
Works if I understood you: Create 2 variables (CinematicYes and CinematicNo) of type integer. If a player votes yes, increase cinematicyes by 1. If a player votes no, increase cinematicno by 1. At the end of your voting trigger, create the action: Trigger - Turn on CheckCinematic Trigger Check Cinematic (off by default) Event: Time - every 1 seconds of the game Action: Trigger - Turn off CheckCinematic If CinematicYes bigger than or equal to CinematicNo then do... Run the cinematic... Else Trigger - Turn off CheckCinematic Game - Display text "Cinematic was skipped!" |
| 07-03-2003, 09:06 PM | #4 |
Omg hive you beat me to it again. |
| 07-03-2003, 09:07 PM | #5 |
Well, have another variable, or use a different number in the array to count how many people are in the game. Then, divide that number by 2 and thats how many votes you need to skip the breifing. So... something like this.... If there are 9 players in the game, and if you divided that by two, it would either be 4 or 5, i forgot if it rounded up, or down, i think it rounds down. Have that divided number be another variable, and when a player says "skip" add one to another variable(one array would make it alot easier) and when they type it, run the check skip movie trigger. and in that, do an If then, check the numbers, if (skipped) is greater or equal to (number players/2) then trigger run skip trigger, else do nothing. Hope that helps... PS, all those variables could be shrunk down into one simple variable array. **there probably is an easier way to do it** |
