Common Ui Gamepad

Hello,

I’m trying to use Common Ui plugin to handle, well all my Ui.
Of course, I have fallen at the first hurdle.

I’ve followed a few tutorials and done most of the work with data tables and button blueprint thingys.

I have a simple interaction system, using an interface. When my Interact message pops up I want the gamepad to focus the button and for the player to simply press that button (displayed gamepad icon) and then to handle my interact logic.

My Interact button is the same as Jump and so when this message is active/visible/enabled or however it is called within Common Ui I’d like the player to not be able to jump also but still be able to move around.

So, a simple task seemingly what I’m struggling with is I can’t actually tell the game that it should now be hilighting the button displayed on the Interact message, once it pops up.

Any help appreciated.

In game scenario Player arrives at a door, message pops up “A - Interact” player presses A on Gamepad, door opens or displays say a “locked” message, player doesn’t jump, interact message goes, player continues through the level.

I’d do it the following way:

Create a boolean in your player BP that determines weather it should be able to jump or not. Lets call it CanJump. Its default value should be true.

In your player BP, in the jump logic, you must add a branch before any other logic, and CanJump must be its condition.

Then, in your activatable widget you should get a reference to your player in the Event Construct. Immediately after that, set CanJump as false. When this interface gets disabled, get your player reference and set CanJump back to true.

This may not be the most elegant way, but it’s what I could come up with. Hope it helps!