Temporarily disable widget button

Hello, I have a custom event in my character’s bp that gets triggered by pressing a widget button.

I scripted some bp to temporarily disable input in my character’s bp when the event starts (to prevent spamming), but it doesn’t seem to work. Not sure what I’m doing wrong.

Please help.

You disable input on the character but you are calling an event in the character.

You need to disable the button in the widget or have some code in the character so that it doesn’t let that event work until its ready again.

You can put a bool in the character and check if it is true when the event is fired and set it to false as soon as you start doing something. Then once you are finished set it to true to allow input again.

You could also disable the button in the widget which would do the same thing but it should look nicer.

First after you press the button, Call the set is enabled node on your button and set it to false.

Then have a timer to set it enabled again once ready.

Alternatively you could have an event dispatcher in the character tell the widget when to reset the button.

1 Like

Thank you, I used the “set is enabled” method and its working fine so far.
I’m grateful for your help.