Toggle input action on and off?

hi , when you enter cloak mode, my flying pawn flip flops between a texture.

Can you guys please tell me how to disable shooting (guns and missiles) while in cloak mode, then can shoot again, after toggling cloak mode off. I just want to disable player input, so pressing shoot temporarily does nothing.

thank you

theres two basic ways this can be done: first you could disable all input to the actor via the disable input option. second you could put a condition in right after the input event you want to block. to setup the second method first create a variable of type boolean and name it “cloaked?”. then just after input event for your shoot button add in a branch node. drag in your variable to have a get of it and connect the variable to the bool input of the branch. this will make it so if cloaked? is true the branch will return true, so i case you will want to connect the false pin to the rest of the script so when not cloaked you are able to fire. the last step is to set the variable which will be done in your cloaking script. drag the cloaked? variable onto the graph again and this time select the set option. attach the set just after your flip flop for each output and have the checkbox on the node set appropriately. thats it pretty simple.

hi thankls it works, but, after i toggle back to normal (not cloaked) shooting doesnt come back, its still disabled :frowning:

sorry i fixed it, missed 1 checkbox, thanks for your help

hi thank you, can i use the same logic, to toggle pawn sensing on, and off, when you are cloaked (so AI doesnt see you when cloaked) Here is the script.