Enhanced Input for Inventory -Kelsey 12/13/2023
Before trying to implement game controller capabilities I had the inventory set up as an action mapping for pressing I on the keyboard. This was set up with a Boolean to either open or close the inventory menu. When setting up the action mapping for the controller I used the input for gamepad d-pad down button along with the I keyboard input in order to open or close the inventory. This caused issues and the inventory would flicker on and off when trying to open it. I also tried doing a key pressed event directly in the blueprint third person class for I on the keyboard and gamepad d-pad down button, and this worked for the keyboard but did not work for the gamepad input. It would open the inventory with the gamepad input but wouldn't register closing.
The solution to this issue was to use the enhanced input plugin that Unreal has. We had already used this plugin for a couple different inputs for pulling up menus. I had to set up the enhanced input and add it to the IMC_Default class that holds all the enhanced inputs. Within the IMC_Default class I added both the keyboard I button and gamepad d-pad down button as input. Then in the third person class I called the enhanced input for inventory and used the started parameter to put the logic for calling the inventory menu. Instead of the logic I had before with a Boolean and checking if it was already open or closed I had a call for adding the inventory widget to the view port. This fixed the issue and can now open and close the inventory menu with both keyboard and controller input. Below I show the updated functionality for calling the inventory menu along with the disconnected past functionality.
Files
Get MystiMayhem
MystiMayhem
Mysti Mayhem is an action RPG where the player uses magic abilities to defeat monsters in different parts of her realm.
Status | In development |
Author | lotuslions |
Genre | Role Playing, Action |
Tags | 3D, Unreal Engine |
More posts
- Enemy Projectile Overlapping - Kelsey 12/06/2023Dec 07, 2023
- Fixing Enemy AI Aiming - Kelsey 11/29/2023Nov 30, 2023
- Player Model Animation Blueprint - Kelsey 11/15/2023Nov 15, 2023
- Enemy Projectiles - Kelsey 11/8/23Nov 09, 2023
- Enemy Death Animations -Kelsey 11/1/23Nov 01, 2023
- Enemy Defense Mechancis - Kelsey 10/13/2023Oct 14, 2023
- GPU Driver Crash - Kelsey 09/29/2023Sep 30, 2023
- Enemy AI Mechanics – Kelsey 09/20/2023Sep 21, 2023
- Unreal C++ Errors – Kelsey 09/15/2023Sep 15, 2023
Leave a comment
Log in with itch.io to leave a comment.