I’ve just hit my first major roadblock in my game development process: input contexts.
My goal is to have my first input context be for the “Player” (CharacterBody2D) to explore the level. This is WASD input for basic movement.
The second input context will be for the “Player” to pause movement after the ENTER key is toggled. This will disable WASD input for this node. This will also trigger a separate SELECT/MOVE controller instance (not “Player, but also a CharacterBody2D) where instead you play as a selection box that the WASD is now connected to. This controller can interact with “Entity” (CharacterBody2D) to pick them up and place them elsewhere, which is not a function of the “Player” class.
How would I achieve switching between...
I’ve just hit my first major roadblock in my game development process: input contexts.
My goal is to have my first input context be for the “Player” (CharacterBody2D) to explore the level. This is WASD input for basic movement.
The second input context will be for the “Player” to pause movement after the ENTER key is toggled. This will disable WASD input for this node. This will also trigger a separate SELECT/MOVE controller instance (not “Player, but also a CharacterBody2D) where instead you play as a selection box that the WASD is now connected to. This controller can interact with “Entity” (CharacterBody2D) to pick them up and place them elsewhere, which is not a function of the “Player” class.
How would I achieve switching between effectively two different Players, especially if the SELECT/MOVE controller is instanced and destroyed upon the ENTER key toggle?
Would I have to keep a packed scene in my player node to instance and destroy, which also disables the player when instanced??? I feel this has an easy solution somewhere.
I have logic for how to move, select, hold etc. (no need for it), I just don’t understanding input mapping and switching between character controllers.
Similar ideas if I haven’t explained effectively: Building systems, using farm tools that when held follow the new selection area with the camera before committing to the action…