how to : when I click a button, it does its thing and it gets disabled for 5minutes and then it gets enabled (on a loop)?
In button onClick you can disable it just by using node SetIsEnabled
.
Then you can use node SetTimerByFunctionName
, set timer to 5 minutes, and call another function that will enable the button.
The button gets disabled on clicked but when I leave the widget it gets enabled again. How to fix this?
Hey there @YUHBE3! Are you destroying the widget and making another? If so it will be reset each time.
Depending if your game is online or not. Hold button state in GameState/Mode, and you should not have these issues. If this is some sort of game rule, it should not go in the Widget anyways