I’m trying to set up a timer reset button. But it doesn’t work. The timer setting logic starts. But when I reset to the second button, nothing happens.
This will just print Hello after 5 seconds. If you press G before that, it won’t, that’s all.
If you want the timer to restart, you’ll need to call your custom event from G also…
I would like to press G to cancel the timer and immediately display “Hello”. Is there a way to change the timer while it’s running?
The thing is that I’m making a dialogue system. And I want to add a button by clicking on which the player will not wait for the character to finish speaking.
That’s what it does, at the moment… except you have the hello in the wrong place.
You can’t change the timer while it’s running, but you can pause and un-pause it
I meant that after canceling the timer, the upper logic (which is on the F button) would continue, and not start a new one.
Pause, as I understand it, stops the timer, not cancels it. That is, I need the timer counter to reset to zero when the G button is pressed
In general, it doesn’t matter. As a result, instead of a timer, I set an event at the end of audio playback:
To skip it and go straight to the next function, I used a “stop” node for the audio component:
The only problem is that for the dialogue you will have to create many events upon completion of audio playback for each replica.
Yes, you can kill it, and start a new one.
If you want to avoid this hassle, you can try a retriggerable delay instead.
you can use IsValidTimer on InputG
if it is valid the timer hasnt completed so execute the custom event logic and clear the timer, if its not valid do nothing
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.