Check input from player

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
tomppa84
Posts: 12
Joined: Fri Sep 09, 2022 6:45 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support

Check input from player

Post by tomppa84 »

Is there a way to see in ACS if the player is using the inventory buttons?
User avatar
ramon.dexter
Posts: 1562
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Check input from player

Post by ramon.dexter »

tomppa84
Posts: 12
Joined: Fri Sep 09, 2022 6:45 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support

Re: Check input from player

Post by tomppa84 »

I have looked there but there is no ACS Definition for invnext and invprev.

Is it possible to bind these for BT_USER1 and BT_USER2?
User avatar
Player701
 
 
Posts: 1710
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Check input from player

Post by Player701 »

invnext and invprev are UI-only, so there is no way to intercept those from ACS. (These commands do not even send anything across the network, only using an item does.)
tomppa84 wrote: Sat Aug 05, 2023 3:33 amIs it possible to bind these for BT_USER1 and BT_USER2?
No, they are completely different commands that don't have anything to do with inventory at all.
User avatar
Sir Robin
Posts: 537
Joined: Wed Dec 22, 2021 7:02 pm
Graphics Processor: Intel (Modern GZDoom)
Location: Medellin, Colombia

Re: Check input from player

Post by Sir Robin »

I don't know ACS, but if it has access to playerpawn.invsel you can watch that for changes. The player would need at least 2 artifacts for that to work, and you couldn't detect directional movement with less than 3, but it's a hacky way to do it.
Post Reply

Return to “Scripting”