multiple outputs based on conditions
Quote from Lpfreaky90 on March 30, 2013, 8:15 amlord_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; 1A math_counter:
Outvalue; logic_case; Invaluelogic_case:
set the value "3" for case01
set the value "4" for case02
OnCase01; coop_manager; setstateafalse
oncase02; coop_manager; setstateatruebutton
onpressed; coop_manager; setstatebtrue
onbuttonreset; coop_manager; setstatebfalsecoop_manager:
onchangetoalltrue (DO STUFF)
onchangetoanyfalse (STOP DOING STUFF)Hope that helps
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
Quote from lord_blex on March 30, 2013, 9:32 amThanks, 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
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
Quote from srs bsnss on March 30, 2013, 10:29 amLpfreaky90 wrote:I would go for...a logic_caseOf course! Why didn't I think of that >.<
Of course! Why didn't I think of that >.<
Quote from DaMaGepy on April 6, 2013, 12:39 amAh 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
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
Quote from FelixGriffin on April 6, 2013, 10:46 amBefore 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.
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.