Punching a button, no literally PUNCHING

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

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.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Hindsight2020
Posts: 261
Joined: Wed Mar 20, 2013 3:29 am
Location: Indiana, USA

Punching a button, no literally PUNCHING

Post by Hindsight2020 »

Hello fellow DOOMERS!

It's been awhile since I posted here and I'm glad to see the community still buzzing right along!

Here's my question:
Does anyone know if it's possible to toggle a switch or button ONLY if it has been PUNCHED with the fist. Not shot or sawed, but punched with the fist. What scripting would I use for that?

Thanks for any and all help.
Last edited by Hindsight2020 on Mon Apr 23, 2018 7:58 pm, edited 1 time in total.
User avatar
Hindsight2020
Posts: 261
Joined: Wed Mar 20, 2013 3:29 am
Location: Indiana, USA

Re: Punching a button, no literally PUNCHING

Post by Hindsight2020 »

Figured it out. And for anyone who may be wondering:

CheckWeapon("Fist")

So simple.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: Punching a button, no literally PUNCHING

Post by Matt »

I was going to suggest that, but consider:

faraway switch
rocket launcher
switching to fist while the rocket is in midair

If there' no line of fire from that distance it'll be fine though.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Punching a button, no literally PUNCHING

Post by RockstarRaccoon »

I suggest you make a test map with a wall that prints the saying that hits it, and use whatever that is. If you go look up my notes on how I made the destructible walls and special beam doors in Metroid Doom, that should work, I remember that you have to use the Hexen style of thing activation, and there is an ACS function that tells you what just hit a wall. You might have to to settle for just being the player, because I seem to recall the player being the one who activates when they punch a wall.

Also, make sure you telegraph that so the player isn't confused.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Punching a button, no literally PUNCHING

Post by RockstarRaccoon »

So... Did you ever get this working? I am curious...
User avatar
Hindsight2020
Posts: 261
Joined: Wed Mar 20, 2013 3:29 am
Location: Indiana, USA

Re: Punching a button, no literally PUNCHING

Post by Hindsight2020 »

Yeah, but I just stuck with CheckWeapon because there was no line of fire long enough so that the player could change weapons before hitting. So it works for my purposes.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Punching a button, no literally PUNCHING

Post by RockstarRaccoon »

You shouldn't trust that. I still think the Collision activator Method is the way to go.

That said, I am tempted to steal this idea on some level.
User avatar
Hindsight2020
Posts: 261
Joined: Wed Mar 20, 2013 3:29 am
Location: Indiana, USA

Re: Punching a button, no literally PUNCHING

Post by Hindsight2020 »

LoL That’s cool. I look forward to seeing that!
Post Reply

Return to “Scripting”