Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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 ?

Product Version: UE 4.19
more ▼

asked Aug 10 '18 at 06:44 AM in Blueprint Scripting

avatar image

3 2 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Like this:

alt text

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!

capture.png (252.5 kB)
more ▼

answered Aug 10 '18 at 07:29 AM

avatar image

15.2k 77 25 62

avatar image HVS_RHS Aug 10 '18 at 07:44 AM

Wow i have never seen this quick replys on any site.

I don't even understand this blue print but i know this is exactly what i want , i ll try to figure it out my self , if i can't than ask u Thank you very much

Edit Even if i don't understand it yet, will it work exactly same as i asked if i copy it and change it to 120 seconds?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users


you can use delay node.

If you want to go further you can try timeline node.

more ▼

answered Aug 10 '18 at 06:58 AM

avatar image

431 4 10 14

avatar image HVS_RHS Aug 10 '18 at 07:08 AM

Hi thank for quick reply But as u can see it is kind of loop and if i put delay before evry function than my fist function will be called after 120 sec and i want to call this functions from beginning of the game till character dies or player left the game I mean if u know how than can u share blueprint picture

avatar image Przemek2222 Aug 10 '18 at 07:44 AM

Sorry for late reply but site doesn't worked for me.

Coppy this to your project content directory


avatar image Everynone Aug 10 '18 at 07:53 AM

I'll just add that his could probably be done with a single Timeline node with a vector track instead. But the time will be fixed since you cannot dynamically adjust tracks run-time (unless you load an external curve, not sure whether this can be done in BP)

@Przemek2222 looks like your suggestion could/should work, it does look a bit crazy and unsustainable, though. Also, that delay node during Timeline's tick is not really a good coding practice (even though it should work)

avatar image Przemek2222 Aug 10 '18 at 08:04 AM

Maybe but in my opinion, yours is too bit advanced as for who said that's new to unreal.

avatar image HVS_RHS Aug 10 '18 at 07:51 AM

Don't be sorry for reply man becoz i have never seen this fast reply anywhere else hahaha

Thanx for reply tho i ll give it try as soon as i sit in front of pc

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question