Switching one ability on disables another


hey everyone might be a dumb question but i just curious how to switch abilities, meaning one can be active at one time either the T ability or the N ability another words disabiling the input when the other is active thanks for the help

1 Like

You can’t use T when N is active and vice versa.


another words disabiling the input when the other is active

You could look into the Enhanced Input and use mapping contexts. Absolute overkill for this very example, though. May be viable if we’re talking about more complex scenarios.


Still having the same issue where i can turn both T N on at the same time those Set bools did you promote the branch or were there from something else? (thanks for your help by the way)

1 Like

The issue is then with what this is connected to. Put a Print String after Pressed bool SET. See what prints and what does not.


Both come up with both string messages

I think I misunderstood what you actually wanted. This script prevents using T when N is being held down and the other way round. Right until said key is released.

I believe what you want is to tap T and be unable to press N unless you press T again (which would disable one of the modes first). Am I close?

Sorry should have made it clearer bit scatterbrained, So the idea is i want to use T input but whilst it is clicked i cannot use the N input that is what i want to make happen so turning off the T or N when the other is active. Hope thats better

1 Like

Hope I got it right. Do tell!


Essentially, you cannot turn Night Vision on if the Thermal is on. They’re exclusive.

being an idiot i am the not node what is that how to get that aha

1 Like

Drag a wire first, then search.


Stops the inputs from working
the flip flops are part of the on and off

No need for them, you already have the bool:


We are already doing the flipping with the NOT node.

Do i need to do the set component aswell ive tried both ways of set component and with the second image of branch and the inputs both dont work

That was just an example:

I don’t have your Post Process, ignore that Tick, had to plug something to demo. The last screenshot looks fine. Does it work the way you need?

neither of the ways work the inputs doesnt do the actions at all if i click either one nothing happens

Could you replicate this:

And confirm this prints as expected.

Ill do that now

I’d start by making sure you have the input working:

image


print string for the inputs work but from the image above nothing prints