AND gate trouble
Quote from Neoxx on May 20, 2011, 11:28 pmI'm trying to set up an area that activates something when the 2 coop players are standing in the right areas. This is the first time working with logic gates, so hopefully theres something obvious I'm doing wrong. I have read the wiki page on logic gates, but obviously something has escaped me. Here's the current chain of events I have set up:
1. trigger_multiple using OnStartTouch and OnEndTouch to detect when the player is in the proper position.
2. Two logic_branch. trigger_multiple sends "SetValue 1" OnStartTouch, and "SetValue 0" OnEndTouch
3. logic_branch_listener setup to listed to both logic_branch. Sends "Enable" and "FireUser1"to math_counter OnAllTrue. (Using Enable/Disable to start/stop item spawning)
4. math_counter ForceSpawn two templates OnUser1 and set to FireUser1 on itself every 2 seconds to repeat spawning.
I've placed both of the triggers in the same place so they can be activated in single player but for some reason the items are not spawning. Its a futbol prop_dynamic with a point_template and env_entity_maker.
I'm trying to set up an area that activates something when the 2 coop players are standing in the right areas. This is the first time working with logic gates, so hopefully theres something obvious I'm doing wrong. I have read the wiki page on logic gates, but obviously something has escaped me. Here's the current chain of events I have set up:
1. trigger_multiple using OnStartTouch and OnEndTouch to detect when the player is in the proper position.
2. Two logic_branch. trigger_multiple sends "SetValue 1" OnStartTouch, and "SetValue 0" OnEndTouch
3. logic_branch_listener setup to listed to both logic_branch. Sends "Enable" and "FireUser1"to math_counter OnAllTrue. (Using Enable/Disable to start/stop item spawning)
4. math_counter ForceSpawn two templates OnUser1 and set to FireUser1 on itself every 2 seconds to repeat spawning.
I've placed both of the triggers in the same place so they can be activated in single player but for some reason the items are not spawning. Its a futbol prop_dynamic with a point_template and env_entity_maker.
Quote from Hanzik on May 21, 2011, 7:21 pmUse "Toggle" instead of "SetValue 1"
For some reason, it works that way... or at least it does in my case.
Use "Toggle" instead of "SetValue 1"
For some reason, it works that way... or at least it does in my case.
Quote from Neoxx on May 21, 2011, 10:26 pmHanzik wrote:Use "Toggle" instead of "SetValue 1"For some reason, it works that way... or at least it does in my case.
Ok I'll give that a shot. That seems odd, though, because it mentions being able to set specific values, so it wont fire again if it receives the same value it currently has. Like if you have it set to 0 when it is already 0, it wont activate any of the outputs for say "OnAllFalse".
But, if it works it works and I wont complain. I just hope the toggle works well enough to be used with OnStartTouch and OnEndTouch. The player would be dying in some way to need it to be turned off, so maybe I'll just put a trigger by the spawn points and have them disable themselves once they are triggered.
Thanks for your help.
For some reason, it works that way... or at least it does in my case.
Ok I'll give that a shot. That seems odd, though, because it mentions being able to set specific values, so it wont fire again if it receives the same value it currently has. Like if you have it set to 0 when it is already 0, it wont activate any of the outputs for say "OnAllFalse".
But, if it works it works and I wont complain. I just hope the toggle works well enough to be used with OnStartTouch and OnEndTouch. The player would be dying in some way to need it to be turned off, so maybe I'll just put a trigger by the spawn points and have them disable themselves once they are triggered.
Thanks for your help.
Quote from ChickenMobile on May 22, 2011, 12:16 amHave you tried using a logic_coop_manager? It is specifically designed for Co-op and has 2 values (A and B) which can be set to True or Talse. On the output "OnChangeToAllTrue" activate your entity.
Have you tried using a logic_coop_manager? It is specifically designed for Co-op and has 2 values (A and B) which can be set to True or Talse. On the output "OnChangeToAllTrue" activate your entity.
