Page 1 of 1

Timed event

Posted: Sat Oct 07, 2023 1:51 am
by SealDev
After dialogue ends, I want to run an Event, after a few seconds.

The way I'm doing it now is enable a gameobject with a TimedEvent script that "Activates on Start". Unfortunately this will only work once.

Is there any other function I could call to run to restart the timer, so that it doesn't only run the first time the TimedEvent object is enabled?

Re: Timed event

Posted: Sat Oct 07, 2023 9:52 am
by Tony Li
Hi,

Instead of activating the GameObject, you can UNtick Activate On Start and configure the end of the conversation to call the StartTimer() method. For example, you could set the final dialogue entry's Sequence to:

Code: Select all

SendMessage(StartTimer, , MyTimerGameObject)
This will call the Timed Event component's StartTimer() method on the GameObject named "MyTimerGameObject".