[Need Help] Doom 2: Martian Buddy lockers
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
- J.A. Matlock
- Posts: 2
- Joined: Fri Jun 05, 2020 4:51 pm
- Location: Lost in Dev.Hell
[Need Help] Doom 2: Martian Buddy lockers
Does anybody know of a way to create lockers that require a key combination like the Martian Buddy supply lockers in Doom 3 for Doom 2?
More importantly I need to know a working key combination script that can be applied to doors and lockers.
I'm using GZDoomBuilder2.3 & Slade3.
Any help would be highly appreciated.
- Kappes Buur
-
- Posts: 4120
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
Re: [Need Help] Doom 2: Martian Buddy lockers
One possible solution https://zdoom.org/zdkb/zdoom16.html
- J.A. Matlock
- Posts: 2
- Joined: Fri Jun 05, 2020 4:51 pm
- Location: Lost in Dev.Hell
Re: [Need Help] Doom 2: Martian Buddy lockers
Hm, while this is interesting, it doesn't quite fit the game I'm creating. I'm thinking it should be a small menu that pops up when the player presses the use key on the key pad. This menu would look like an 11 key number pad, 0-9 & enter. The player would then use the mouse cursor to click on the keys in the correct order to unlock the door, locker, gate, etc. If the player presses use on the key pad, but does not know the code they could simply press use again to cancel.
I'm a decent digital artist so coming up with the map design, textures & overall art is no problem, however, code has always been my weakness & I'm working on it.
I'm a decent digital artist so coming up with the map design, textures & overall art is no problem, however, code has always been my weakness & I'm working on it.
- Kappes Buur
-
- Posts: 4120
- Joined: Thu Jul 17, 2003 12:19 am
- Graphics Processor: nVidia (Legacy GZDoom)
- Location: British Columbia, Canada
- Contact:
Re: [Need Help] Doom 2: Martian Buddy lockers
Doing a search for key pad I found that some years ago (2005) Wasted Youth worked on a script to accomplish a password protected door with a key pad. I don't know if he ever made his pwad available to the public, though.
Re: [Need Help] Doom 2: Martian Buddy lockers
I have made a shop interface for my mod that I was able to edit to work as a keypad.
It's not perfect, and only works with 3-number pass codes as is, but can be edited easily.
This keypad is operated using movement keys for selecting, fire for pressing the selected key and altfire for backing out of it.
To my knowledge, ACS does not support mouse movement, so it's not exactly like in Doom 3.
This was made to be "universal", so it takes 3 arguments from ACS_Execute as the pass code.
It also only opens the door it's placed on, as I ran out of arguments to make it execute a script.
If there's a way to execute a script with 4 arguments, I can edit it so it takes arg4 as a script number.
Included is a test map with 3 doors, each with a different combination.
There's a switch behind the player that tells the codes.
The KeyCode script itself starts from below the "ENDMAP" marker in SLADE.
It's not perfect, and only works with 3-number pass codes as is, but can be edited easily.
This keypad is operated using movement keys for selecting, fire for pressing the selected key and altfire for backing out of it.
To my knowledge, ACS does not support mouse movement, so it's not exactly like in Doom 3.
This was made to be "universal", so it takes 3 arguments from ACS_Execute as the pass code.
It also only opens the door it's placed on, as I ran out of arguments to make it execute a script.
If there's a way to execute a script with 4 arguments, I can edit it so it takes arg4 as a script number.
Included is a test map with 3 doors, each with a different combination.
There's a switch behind the player that tells the codes.
The KeyCode script itself starts from below the "ENDMAP" marker in SLADE.
- Attachments
-
- KEYCODE.wad
- (18.06 KiB) Downloaded 39 times
Re: [Need Help] Doom 2: Martian Buddy lockers
I deeply apologize for the double post, but apparently I lied when I said this:
- The script requires mouselook to be enabled to work.
- I set up sensitivity to work well with mine, so I don't know how well it will work for other people.
To customize sensitivity edit lines 19 and 20 in the script, changing "50" to any other number. Bigger values lower the sensitivity, while lower values raise it.
- It's set up for 320x200 resolution, so in widescreen the cursor won't get to the edges of the screen.
The controls were changed to be mouse-only.
And pressing fire outside the keypad will close it, just like pressing altfire anywhere.
The test map was not changed at all, only the script was changed.
I have managed to make the script support mouse movement with a few things to keep in mind:Jarewill wrote:To my knowledge, ACS does not support mouse movement, so it's not exactly like in Doom 3.
- The script requires mouselook to be enabled to work.
- I set up sensitivity to work well with mine, so I don't know how well it will work for other people.
To customize sensitivity edit lines 19 and 20 in the script, changing "50" to any other number. Bigger values lower the sensitivity, while lower values raise it.
- It's set up for 320x200 resolution, so in widescreen the cursor won't get to the edges of the screen.
The controls were changed to be mouse-only.
And pressing fire outside the keypad will close it, just like pressing altfire anywhere.
The test map was not changed at all, only the script was changed.
- Attachments
-
- KEYCODEMOUSE.wad
- (13.99 KiB) Downloaded 39 times
Last edited by Jarewill on Sun Jun 07, 2020 6:08 am, edited 1 time in total.
Re: [Need Help] Doom 2: Martian Buddy lockers
Neat - however, as an inverted mouse player, it could do with a check for that. It makes it very hard to use otherwise.
Re: [Need Help] Doom 2: Martian Buddy lockers
Right, I fixed it now.
Sorry for not thinking about that earlier Enjay.
Sorry for not thinking about that earlier Enjay.
Re: [Need Help] Doom 2: Martian Buddy lockers
Much easier to use.