How to set 3 function in specific order and for specific time of interval ?
Hi, i m new in unreal engine, and i m kind a stuck in my game development.
So my question is Suppose i created three function and i want to call function in order of 1-2-3-2-1..... Like i can call function 1 but for 120 seconds only and when time is finish, time reset to 0 and i can call function 2 for 120 seconds and so on...... How can i do that ?
The Time is set to 2s here. You can also make the Time into a variable and use an extra Select node to fire each function for X seconds rather than a fixed 120.
Currently it fires f1 (2s) - f2 (2s) - f3 (2s) - f2 (2s) - f1 (2s); and restart from the beginning of Select node.
Timer will fire the Increase Index event every 2s, add 1 to the current value, wrap it around 5 using modulo (so the whole thing will eventually restart) and Set the final Next Function Index value. This value is then used on the Select node to step through the required index order (which you can change as your heart desires :)
Event tick is firing through the Switch based on the value at the Next Function Index in the Select node.
Seems to be working as you described but I might have missed something.
Let me know and good luck!
answered Aug 10 '18 at 07:29 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here