hi i was wondering if it is possible to make a trigger that will play music but only if two players are in the trigger at the same time. this is for a multiplayer map as im sure you have guessed by now.
Game_zone_player is a volumetric trigger that counts the number of players inside of it and the number of players outside of it. The number of players inside it is passed along as a parameter to its PlayersInCount output. Therefore, you could set up a trigger_multiple and a game_zone_player in the same volume, with the trigger_multiple firing the game_zone_player OnStartTouch with the input CountPlayersInZone. The game_zone_player, in turn, would fire a logic_case using output PlayersInCount and input InValue. The logic_case would need one of its cases set to "2"; the output corresponding to that case would trigger the music.
Leave out the game_zone_player entirely. Just have a trigger_multiple in that area. Give it an OnStartTouch output that adds 1 to a math_counter, and an OnEndTouch output that subtracts 1 from the same math_counter. Then, plug the math_counter's OutValue output into the logic_case's InValue input.
i like the first one better. this will be awesome so when two apponents come across each other in one of the battle areas they will have an intense sword fight with awesome music which i will find. cheers for the quick reply
For the first one, it might be wise to put a half-second delay between when the trigger_multiple sees a player and when the game_zone_player counts how many there are. In my testing I noticed that I could sometimes hit the trigger without the g_z_p noticing me. You may also want to have the trigger's OnEndTouch output force a player count as well.