Did you set a value for Initial Cooldown Time? If you left the value at 0, then the Delay between the two timers will not delay anything and your cooldown text will be instantly hidden again.
Also, in the first timer, the Time value is not what you want your cooldown to be. Your spell’s cooldown is Initial Cooldown Time. The Time value in the first Set Timer Delegate is the rate at which the timer will loop.
A value of 5 like your screenshot means that the timer will fire the Update CooldownText event every 5 seconds, which is way too long. If you want your timer to show decimals (count from 3.0 to 2.9 to 2.8 etc, instead of showing “3” for a full second then going directly down to “2”), then change the 5 seconds to 0.1 seconds like in my original answer.
That means every 0.1 seconds, the Update CooldownText event will fire, and add 0.1 seconds to the cooldown text being displayed.
I have changed the 5 seconds down to 0.1 like you said in the first timer. Thank yyou for explaining it to me. I have also set the Variable “Inital Cooldown time” to 10 seconds but no success. The text is not displaying at all.
Is your Trigger UI Spell Cooldown event firing? Select it and Press F9, it will put a breakpoint on it (a red dot). A Breakpoint will pause the game and focus on the node if the node is activated, and then you can go forward in time one frame/action at a time to see what’s going on.
If you put a breakpoint on that event node and are able to use your spell in-game without being stopped, then it’s not firing at all and the problem is elsewhere.
You are using Event UI Trigger Cooldown incorrectly in this case.
An Event node is a receiving-end node. It receives a signal and triggers the stuff you plug it in. You’ve never calling your Event UI Trigger Cooldown that is in your widget in this screenshot.
Drag the reference to the widget into your graph, drag from its output and type UI Trigger Cooldown. There should be a node called UI Trigger Cooldown (Message) or UI Trigger Cooldown (Interface Call), depending on your engine version. That will call the Event in your widget, which will then fire off the code you set up in your widget.
well, i sort of got it to work. I got the Numbers counting down from 10 on the widget and i put a 10 second delay on the Spell. But when i try to fire the spell when the text goes away i can’t. It’s only like 6 seconds after when i can.
Based on your latest screenshot, what happens when you press 1 the first time is that it doesn’t actually trigger the cooldown at all.
I imagine IsCoolDown is false the first time you press 1, so it will create your spell and set IsCoolDown to true, but it will never trigger the delay unless the user presses 1 again.
The Delay and Set IsCoolDown false plugged into the True branch needs to be at the end of your False branch, after the Set IsCoolDown True.
That way, when you press 1 it will cast your spell, set IsCoolDown to true (preventing the user from casting the spell again since it will go into the True branch, which should no longer have anything plugged into it, and then 10 seconds after the spell is cast, IsCooldown will reset to False and allow the user to cast it again.
Thank you so much! Sorry for all the questions. I’m new to this and i want to learn. Thanks for all the help! Looks like i got everything i want now. Thank you so much <3