Deleted User #135808
Is it possible (without using ICARUS) to have a puzzle where someone has to press buttons in the right order? I'm trying to figure out if this can be done purely with entities.
A technical discussion on implementing sequential button puzzles (combination locks) in Multiplayer environments where ICARUS scripting is unavailable. The thread explores using entity-based logic gates, target_laser obstructions, and the limitations of JK2's entity set compared to JKA.
[2023-11-10 17:06] <Deleted User> other question, is it possible (without icarus) to have a puzzle where someone has to press buttons in the right order? [2023-11-10 17:14] <.mjt> Possibly with counters, target activate and deactivate [2023-11-10 17:14] <.mjt> Build a flip flop with resets [2023-11-10 17:15] <.mjt> Counter has bounce value [2023-11-10 17:15] <Deleted User> whats a counter [2023-11-10 17:15] <.mjt> Target [2023-11-10 17:15] <.mjt> Counter [2023-11-10 17:16] <Deleted User> must be jka only thing [2023-11-10 17:16] <garuxx> or buttons & shooters, c Sock's logical gates [2023-11-10 17:17] <garuxx> if JK got shooters -) [2023-11-10 17:17] <.mjt> or buttons and trigger_multiples [2023-11-10 17:19] <ensiform> I don't think the shooter entity works in jk2/a [2023-11-10 17:20] <.mjt> looking at jk2 mp code - doesn't seem possible [2023-11-10 17:20] <.mjt> neither does it have counter in MP nor activate nor deactivate [2023-11-10 17:21] <.mjt> if it has a target beam that does damage on impact you could build a sort of gate pattern with doors [2023-11-10 17:21] <.mjt> does target_laser work in jk2MP @Deleted User ? [2023-11-10 17:24] <Deleted User> i think so [2023-11-10 17:24] <Deleted User> π€ [2023-11-10 17:25] <Deleted User> would this idea also work if doors are noclip like in jka defrag? [2023-11-10 17:25] <.mjt> probably not then... [2023-11-10 17:25] <Deleted User> π¦ [2023-11-10 17:25] <.mjt> can func_usable toggle in jmk2 MP? [2023-11-10 17:25] <.mjt> doesn'T have to be a door [2023-11-10 17:25] <.mjt> just some ent you can toggle that obstructs the laser? [2023-11-10 17:25] <Deleted User> func_usable can i think [2023-11-10 17:25] <Deleted User> oh [2023-11-10 17:25] <Deleted User> i see [2023-11-10 17:25] <ensiform> Are doors totally noclip or just for players [2023-11-10 17:26] <Deleted User> not sure [2023-11-10 17:26] <Deleted User> ill have to test [2023-11-10 17:28] <.mjt> @Deleted User can func train be made to stop at each path corner and only move on if triggered? [2023-11-10 17:28] <Deleted User> dunno [2023-11-10 17:28] <ensiform> Definitely not in q3a [2023-11-10 17:28] <ensiform> But probably in jka with Icarus [2023-11-10 17:29] <.mjt> no I mean in JK2 MP [2023-11-10 17:29] <Deleted User> i can check later [2023-11-10 17:29] <.mjt> JKA would be easy as hell to implement his idea with icarus [2023-11-10 17:29] <.mjt> but in JK2... [2023-11-10 17:29] <ensiform> Well there's no Icarus there so maybe maybe not [2023-11-10 17:29] <.mjt> [attachment: https://cdn.discordapp.com/attachments/1103343199113711766/1172588905657286666/image.png?ex=6a02bac4&is=6a016944&hm=5ae6d798aa934c59c8c190d9f3f4e5c09385063ef9dba24725724575198c7649&] [2023-11-10 17:29] <.mjt> not sure how precise those entity definitions are^^ [2023-11-10 17:29] <ensiform> I mean rtcw and ET have better train control as does Q3F/ETF mod but stock q3 you can't even stop lol [2023-11-11 05:13] <Deleted User> xd [2023-11-11 05:42] <Deleted User> ty [2023-11-11 15:39] <Deleted User> rip [2023-11-11 17:06] <.mjt> https://www.youtube.com/watch?v=nISP-NS-kaw [2023-11-11 17:25] <Deleted User> hm [2023-11-11 17:25] <.mjt> yeah^^ [2023-11-11 17:25] <Deleted User> haha [2023-11-11 17:25] <.mjt> xD [2023-11-11 17:28] <Deleted User> π [2023-11-11 19:44] <Deleted User> @mjt what was your idea with the gate pattern? i tried to think about using func_usable somehow in this sense, but the logical error i run into looking at the code is that the func_usable cannot distinguish between being used and being damaged. it just toggles on and off. i'd need to respawn the already destroyed ones if a wrong button is pressed, but whether it respawns or is destroyed is basically dependant on the old state of it. there is no fixed way to "just" respawn apparently [2023-11-11 19:44] <Deleted User> or maybe there's a way to make it work anyway somehow via some xor logic? thinkmonocle [2023-11-11 19:45] <Deleted User> hmm dont tell me yet, ill contemplate some more [2023-11-11 19:57] <.mjt> there are no respawnable brush entities [2023-11-11 19:58] <Deleted User> π‘ [2023-11-11 19:58] <Deleted User> this is a fun puzzle tho [2023-11-11 19:58] <Deleted User> trying to figure out if i can do it [2023-11-11 19:58] <Deleted User> hang in there. [2023-11-11 19:59] <.mjt> func_usable has always on spawnflag though [2023-11-11 19:59] <Deleted User> i said hang in there [2023-11-11 19:59] <.mjt> would be usable as a tracing bullet catcher [2023-11-11 19:59] <Deleted User> let me have the puzzle [2023-11-11 19:59] <.mjt> okay okay [2023-11-11 19:59] <.mjt> π [2023-11-11 19:59] <Deleted User> SHHHHHH [2023-11-11 19:59] <Deleted User> shush [2023-11-11 19:59] <ramikad_1091> IMO, I would check how it's done in T2_DPRED. (edited) [2023-11-11 19:59] <.mjt> that's SP [2023-11-11 19:59] <.mjt> @Ramikad [2023-11-11 19:59] <.mjt> and he's making something for JK2 MP [2023-11-11 20:00] <ramikad_1091> Yeah, but it might work in MP too. Worth at least checking out. [2023-11-11 20:10] <Deleted User> my god, does jk2 not even support trigger_multiple with use_button..... [2023-11-11 20:10] <Deleted User> :why: [2023-11-11 20:17] <Deleted User> oh i think that func_usable actually works in racemode thinkmonocle [2023-11-11 20:17] <.mjt> [attachment: https://cdn.discordapp.com/attachments/1103343199113711766/1172993475860500580/image.png?ex=6a02394d&is=6a00e7cd&hm=98b640c93f04f5d45252b1d65c30a26e9f15a26a83848dd6d708292fe33202c8&] [2023-11-11 20:17] <.mjt> are you sure? [2023-11-11 20:17] <Deleted User> i mean i tried it ingame [2023-11-11 20:17] <Deleted User> and it kinda does nothing [2023-11-11 20:18] <.mjt> spawnflags 1 was it? [2023-11-11 20:19] <Deleted User> π€ [2023-11-11 20:19] <.mjt> what was your goal again? [2023-11-11 20:19] <Deleted User> its spawwnflag 4 in jka [2023-11-11 20:19] <Deleted User> i wawnt to make puzzle where u have to press buttons in right order [2023-11-11 20:19] <.mjt> I'm looking at JK2 MP code [2023-11-11 20:19] <.mjt> JKA and JK2 spawnflags might not be the same [2023-11-11 20:19] <.mjt> lol [2023-11-11 20:19] <.mjt> genious move [2023-11-11 20:19] <Deleted User> damnit looks like target_laser doesnt work in racemode GRRRAAAAAW [2023-11-11 20:19] <.mjt> what even is racemode? [2023-11-11 20:19] <Deleted User> defrag [2023-11-11 20:20] <Deleted User> japro [2023-11-11 20:20] <.mjt> then fix defrag and japro [2023-11-11 20:20] <.mjt> they should have stayed vanilla compatible and extended on top of that [2023-11-11 20:20] <Deleted User> k i only have one option [2023-11-11 20:20] <Deleted User> i need to make platforms to climb over [2023-11-11 20:20] <Deleted User> and the only way to spawn them all is to use correct combination of buttons [2023-11-11 20:21] <Deleted User> but that wont solve using them in the correct order :( [2023-11-11 20:21] <.mjt> ah still the combo lock [2023-11-11 20:21] <Deleted User> ye [2023-11-11 20:21] <Deleted User> because xor wont care about order [2023-11-11 20:21] <Deleted User> D: [2023-11-11 20:21] <.mjt> well did you parse the defrag / japro code for what their entities offer? [2023-11-11 20:21] <Deleted User> i want it to work in jk2 too [2023-11-11 20:21] <.mjt> when you said defrag, I thought you meant jk2 defrag [2023-11-11 20:22] <Deleted User> both [2023-11-11 20:27] <Deleted User> where do you see the spawnflag here [2023-11-11 20:27] <Deleted User> oh god ur right its spawnflag 1 [2023-11-11 20:29] <Deleted User> and the spawnflag that would make it work in jka actually disables it in jk2 [2023-11-11 20:29] <Deleted User> even if the 1 one is active [2023-11-11 20:29] <Deleted User> π [2023-11-11 20:30] <.mjt> well you can have two triggers there and just route them through extra relays [2023-11-11 20:30] <.mjt> and in JKA you can disable the trigger with target_deactivate [2023-11-11 20:30] <.mjt> so just rip the JK2 one out of JKA π [2023-11-11 20:30] <Deleted User> ya just gonna make 2 i guess [2023-11-11 20:31] <Deleted User> but then [2023-11-11 20:31] <Deleted User> oh [2023-11-11 20:32] <Deleted User> wow this would be such a mess to do [2023-11-11 20:32] <Deleted User> haha [2023-11-11 20:32] <.mjt> why, spawnflags 1 shouldn'T disable it in JKA [2023-11-11 20:32] <.mjt> just restrict it to clients [2023-11-11 20:32] <Deleted User> yes [2023-11-11 20:32] <.mjt> instead of clients AND NPCs [2023-11-11 20:32] <Deleted User> yes [2023-11-11 20:32] <Deleted User> but in reverse, 4 disables it in jk2 [2023-11-11 20:32] <Deleted User> for some reason [2023-11-11 20:34] <.mjt> does spawnflags 7 still suit you in JKA MP? / [attachment: https://cdn.discordapp.com/attachments/1103343199113711766/1172997754340003921/image.png?ex=6a023d49&is=6a00ebc9&hm=c38550312a8411813795c8c3fdda9fa47c5a774cc12a8e409f2f65db35441e28&] [2023-11-11 20:34] <.mjt> as in... is the facing thing okay or would it be non acceptable? [2023-11-11 20:34] <.mjt> otherwise maybe it would mean it works in JKA and JK2? [2023-11-11 20:34] <.mjt> for JK2 it would mean usebutton & team red & team blue [2023-11-11 20:34] <Deleted User> oh [2023-11-11 20:35] <Deleted User> well teamredteamblue probably is ctf only [2023-11-11 20:35] <Deleted User> so it would always be inactive [2023-11-11 20:35] <Deleted User> anyway [2023-11-11 20:36] <.mjt> go puzzle on π [2023-11-11 20:42] <Deleted User> and ofc target_usable doesnt care about the exact amount of health either [2023-11-11 20:42] <Deleted User> the moment it is hit in any way, it turns off
Is it possible (without using ICARUS) to have a puzzle where someone has to press buttons in the right order? I'm trying to figure out if this can be done purely with entities.
Possibly with counters, target activate, and target deactivate. You could build a flip-flop with resets. The counter has a bounce value.
Wait, I'm looking at the JK2 MP code nowβit doesn't seem possible there. JK2 MP doesn't have the counter entity, nor activate/deactivate. If it has a target beam that does damage on impact, you could build a sort of gate pattern with doors. Does target_laser work in JK2 MP? You could use some entity you can toggle, like a func_usable, to obstruct the laser and create logic gates.
You could try buttons and shooters, similar to Sock's logical gates, if JK has shooters.
I don't think the shooter entity works in JK2 or JKA. Regarding the other suggestion, stock Q3 func_trains can't even be made to stop at each path corner; they just keep moving. You can do more advanced train control in JKA with ICARUS, but in JK2 MP, there's no ICARUS, so you're very limited.
I'm running into a logical error looking at the code: func_usable cannot distinguish between being used and being damaged. It just toggles on and off. I'd need to respawn the already destroyed ones if a wrong button is pressed, but there are no respawnable brush entities.
I want to make a puzzle where you have to press buttons in the right order to spawn platforms to climb over. If I use XOR logic, it won't care about the order, which defeats the purpose. This is a fun puzzle to solve, but JK2 is making it difficult.
func_usable has an 'always on' spawnflag that could be used as a tracing bullet catcher. Be careful with spawnflags though; JKA and JK2 spawnflags are not the same. For example, spawnflag 1 in JK2 MP is for 'use_button'. You might need to route triggers through extra relays. In JKA, you can disable a trigger with target_deactivate, but for JK2 compatibility, you might have to get creative with how you route the entities.
It looks like target_laser doesn't work in certain race mods like Defrag or Japro, which is a pain. Also, the spawnflag that makes it work in JKA (spawnflag 4) actually disables it in JK2 for some reason. Even if spawnflag 1 is active, it fails. I'm probably going to have to make two separate trigger setups and route them differently to support both games. It's a total mess to do without scripting.
I would suggest checking how it's done in the map T2_DPRED. Even though that is Single Player, some of those entity setups might be portable to Multiplayer if you're lucky.