#How to approach different input control "systems"?

2 messages · Page 1 of 1 (latest)

fathom salmon
#

I'm trying to create a system where I play the game normally in First person. But when interacting with different machines & stations I get "minigames" to complete with the cursor.
How would i structure my code to switch into any minigame, locking the firstperson controls, moving camera and etc?

Sort of like Schedule I does it with workbenches, for reference.

hidden osprey
#

the two approaches that have worked best for me are:
a) having a global autoload script that has an enum of all the possible input states and then in physics_process or _input or wherever your input code is, checking that enum to see whether or not to proceed.

b) have a root node that sets the proces mode to disabled for branches that don't need input, this pauses them so they don't process input.

you can of course do fancier stuff, but I think most games don't need it.