I’ve been racking my head around this concept and I need some help.
Currently I have the ability for a player to highlight “Interactable” objects and then based on their range and other factors when they “LClick” they become engaged with that object (lock down movement input) you get presented a list of actions you can take.
The below video shows this, as I get closer to the blue box it eventually gets highlighted and after Left clicking I’m presented with options I can take. This current implementation isn’t great or expandable.
Current Design Implementation:
- Interactable Interface
- Static objects extend actor and implement Interactable (Container class as an example)
- Non-static objects extend character and implement interactable
Container has a BP version that also has a custom actor component attached called “Selectable Component” This component allows the player character’s trace cast to allow it to become highlighted and also to be used for the interaction system.
When the container object that gets selected and then engaged it builds out the action list for the player. (I don’t think I like this approach currently because it’s not flexible enough for what I want)
I can’t think about how to design this. Let’s talk about the example in the video. The player can press 1 to Pick Lock, press 2 to Attack and press 3 to disengage. The attack action should actually lead to a sub-menu of more actions like 1. Weapon Skills, 2. Magic Abilities, 3. Items and so forth which would lead to another level of actions, whereas the pick lock action is a true action that can be acted on the object. Also those actions will not always be the same or on the same number to select.
Any help or brainstorm ideas would be very appreciated! Thanks for reading.