Disclaimer: I’m a newb with UE4.
Preface: I’ve looked around for other threads regarding but couldn’t find anything.
tl;dr
Is it possible to swtich to/enable a control scheme when event X occurs (event X being something as simple as a context sensitive button press)? In an effor to keep the a) level blueprint and b) my character blueprint’s event graphs clean, I’d prefer not having to check the player’s state/mode (in car, on foot, etc.) with every press of a button.
Thanks to all the helpful people out there, I managed a control setup where the player can switch between 1st and 3rd person at any time, and the control scheme follows suit. Currently, is all located in the my character blueprint’s event graph, where I use branches to switch the controls based on a “mode” variable (currently toggled via button press) .
I want to add other control schemes like for commandeering different vehicles and such. The vehicles could/will have completely different control schemes. A simple example would be: spacebar makes a unicycle jump, makes a car brake, etc.
I expect can all be done in the same event graph (with all sorts of action inputs, and stuff), but I’m worried it’s gonna get unwieldy/messy and worse, might introduce a bit of lag as I have to do variable checks (i.e. if (controlmode == 1 then biped controls, if 2 then unicycle controls, etc.) on every button press.
Input nodes seem to be constantly running, even if they aren’t being used.
Would it be possible to use a blueprint interface or something similar to activate/deactivate event graphs (killing all the processes in the previous event graph after a control scheme switch)?
I don’t believe any of the default templates have any examples of (Vehicle is close, but it only has 2).
Might anyone have any recommendations or references?
Thanks in advance!