I was just wondering how I’m supposed to flip a Digital (bool) value with the new enhanced input system…
I’ve tried the negate modifier, but no matter what I check and don’t check, it’s always false.
I could use an Axis1D, but I feel I should just be able to use a digital type when I want a boolean.
So depending on what you’re trying to do, you may want to use a different execution line. Basically, the Input Action sits as False until triggered/started/ongoing, at which point the bool is True. It will flip back to False when released. Canceled execution runs when the button is released (so you can do things other than just flip the digital to False). At least that’s my experience with it.
Here’s the documentation if you want to read more into it. OTHERWISE, if you let me know in gameplay terms what it is you’re trying to accomplish I might be able to guide you in the right direction!
I’m just using it to rotate through tabs in a menu.
In an ideal world, E would output true, and Q would output false. This boolean would then be used to determine the direction to rotate through the menu.
It looks like I’ll just have to use Axis1Ds. Probably cleaner anyways
I’m not really sure why action value is even a value on the event then…
So what Axis Value is getting is the True or False. Basically grabbing “IsPressed?”. So you can pull that bool and use it to check other stuff. Like for instance “Crouch”, and “Sprint”, You’d pull that bool from the opposing action to check if it is true, so if “Crouch” bool runs false, you can go ahead and “Sprint” or whatever.
Yeah I’d use an axis 1d on this for sure, you need it because you have 3 values
(Axis 1d = Off, OnLeft, OnRight vs
Digital = Off, On).
Yeah I’m actually using it for sprint.
I’m still not sure why the value telling you if the button is pressed is on the node that fires whenever said button is pressed… seems redundant.
So I’m going to try harder to clarify: the node holds a variable of that bool, whether it’s being fired or not, so the bool part matters just as much when the button isn’t pressed as much as when it is pressed.
Because when it ISN’T pressed that variable is still stored, it’s just false. That action value is used as a GET, not a SET, so NOTPRESSED is still utilized while you’re not pressing the button. This is opposed to the previous way many, many people did things (I’m using the enhanced input node but the old nodes didn’t have the bool):
I hope that makes more sense. But really you can just think of it as cutting out a lot of extra nodes and steps if you need to know somewhere else whether a button is pressed or not.