Presentation is loading. Please wait.

Presentation is loading. Please wait.

Timers in Unreal By Todd Brown. Setting up a timer Add ‘simulated function Timer()’ to your class Within this function, put the code for whatever you.

Similar presentations


Presentation on theme: "Timers in Unreal By Todd Brown. Setting up a timer Add ‘simulated function Timer()’ to your class Within this function, put the code for whatever you."— Presentation transcript:

1 Timers in Unreal By Todd Brown

2 Setting up a timer Add ‘simulated function Timer()’ to your class Within this function, put the code for whatever you want executed when the timer count down ends Keep in mind that this code can be called either once or multiple times, depending on how you call the SetTimer() function

3 Setting the timer Use SetTimer() function to setup the timer Once set, the timer begins counting down to execution The form of the call is SetTimer(float time, bool repeat) ‘time’ is a float value for how long you want the timer to wait from the time it is set to the time the code in the Timer() function is executed ‘repeat’ is a bool value for if you want the code in the Timer() function to repeat execution every ‘time’ interval

4 Code simulated function Timer() { // The code you want executed goes here. } simulated function Example()// This can be any given function. { SetTimer(10, true) /* Tells the timer to execute 10 seconds after the this function call and to repeat execution every 10 seconds thereafter. */ }


Download ppt "Timers in Unreal By Todd Brown. Setting up a timer Add ‘simulated function Timer()’ to your class Within this function, put the code for whatever you."

Similar presentations


Ads by Google