Talk:Logic case
Error with ambient_generic
I have one of these logic cases with 8 unique ambient_generic entities attached to it and a button that randomly selects a case. On all of the case events, they stop all the ambient_generics and after a delay of 1 second plays its own sound. When compiled, the logic_case ignores the option to stop the sounds but still delays by 1 second the option to play the sound. The other logic_cases in my map work properly. It is only this one with I am having trouble. --MongoTheMad 23:11, 31 July 2009 (UTC)
- If I understand you correctly, you're trying to stop an ambient_generic from playing a sound. This won't work because of bugs with the ambient_generics which can only be fixed by a programmer. --TomEdwards 08:13, 1 August 2009 (UTC)
- It still doesn't make sense. It works just fine in my other map, but when a logic_case is involved, it doesn't work.--MongoTheMad 17:51, 1 August 2009 (UTC)
Test Value
What is that? How do I use it, and what for? This is not the only entity that 'tests' things, could I get an explanation on all of these? --Mr.p.kiwi 04:27, 30 July 2011 (PDT)
- It means that the input value (or random value) is compared against all available cases. Also, please sign your comments. Solokiller 04:15, 30 July 2011 (PDT)
- First of all, sorry for not signing, slipped my mind. Secondly, how does it compare things, and for what use? --Mr.p.kiwi 04:27, 30 July 2011 (PDT)
- It compares a value against up to 16 values, and depending on which it is equal to a corresponding output is fired. For example, if the case keyvalues have the numbers 1 through 16, and the input value is 7, then case 07 is equal and fires the output OnCase07. if it isn't a value between 1-16 then the output OnDefault is fired. Solokiller 04:42, 30 July 2011 (PDT)
- First of all, sorry for not signing, slipped my mind. Secondly, how does it compare things, and for what use? --Mr.p.kiwi 04:27, 30 July 2011 (PDT)
Moving props with logic_case
I'm was thinking about how to add a moving car with dynamic light to my map. It mainly should look like the moving cars, appearing at random times on de_nuke (CS:S).
It's dark allover, so the car needs its lights turned on ;D. After decompiling de_nuke, i found out that they used a logic_case together with an logic_timer to make the cars appereance totally random!
Now i wonder how to create such a moving prop without a func_tracktrain or so.
--- DA!M - 02:24, 7 September 2011 (PDT)
func_door or func_movelinear with a parented prop could work for making a moving prop. Assuming one direction. Turns could be done carefully OR parenting to a func_rotating. Just in case ya'll feeling fresh. (also path_track dont' work great dynamically, so they limit some possibilities. --Ninjaofsauce (talk) 21:24, 19 January 2021 (PST)
17+ Values with logic_case
Would it be problematic to use more than 16 values with the logic_case if you disable SmartEdit? I mean, I am sure it is not supported, but would it begin to actually cause problems?
--Numanumaro 07:14, 11 November 2013 (PST)
- Since the code wouldn't expect any additional keyvalues, they would be ignored altogether. It would amount to no more than a few extra bytes to store the key-value pairs. Unless the key names happen to be used somewhere else in the entity (which they most likely aren't), they shouldn't affect the game in any way. Solokiller 12:33, 11 November 2013 (PST)