Please or Register to create posts and topics.

multiple outputs based on conditions

PreviousPage 2 of 2
lord_blex wrote:
On a sort of related note: How do I get game_text work properly in multiplayer? It only shows up for one player, even if I set the all players flag. (still on splitscreen, but I assume it's no different in actual online multiplayer)Or should I use another entity?

Game_text work for the entire screen; not per player; so as long as you have the all players flag checked it shows up for all players. On splitscreen however the texts are overlapping thus you'll only see one.

As for the cases; I would go for a combination of a trigger_multiple, math_counter, a logic_case and a coop_manager:

A trigger multiple:
OnStartTouch; math_counter; add; 1
OnEndTouch; math_counter; subtract; 1

A math_counter:
Outvalue; logic_case; Invalue

logic_case:
set the value "3" for case01
set the value "4" for case02
OnCase01; coop_manager; setstateafalse
oncase02; coop_manager; setstateatrue

button
onpressed; coop_manager; setstatebtrue
onbuttonreset; coop_manager; setstatebfalse

coop_manager:
onchangetoalltrue (DO STUFF)
onchangetoanyfalse (STOP DOING STUFF)

Hope that helps ;)

Thanks, the logic_case was something I was looking for. It was really annoying messing around with the min and max values of the counters if I wanted a proper output..
But I have something working now, so I don't really wanna mess it up. Unless it proves to be non-functioning - then I will get back to this :P

- Science isn't about why, it's about why not!
Lpfreaky90 wrote:
I would go for...a logic_case

Of course! Why didn't I think of that >.<

ImageImage

Ah I just found this topic, I see its already been solved, but the easiest way to do the 4 player in the area and a button is pressed is just make the counter max at 5, and also add a, add/substract for the button. So it only activates if all player is in the area (4) aplus the button is pressed. Thats when its 5. if its pressed but less than 4 is in the area, it will never be 5.
math_counter is the new ducttape :)

-= Check out my maps: workshop, and their .vmf sources: homepage =-

Before the PTI came out and I learned what math_counters could be used for I always had long chains of relays being enabled and disabled, with a timer constantly trying to fire a signal through the chain. If the element being activated didn't receive a signal every second one of the relays had deactivated and the element shut off. Ugh. :P

Falsi sumus crusto!
PreviousPage 2 of 2