x

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 add a countdown timer in C++?

So basically I'm working on pickups and I don't want the player collecting them right away.. I'm looking to add a timer that counts down about 3 seconds before they can be collected. What is the basic function for a timer countdown in UE4?

Product Version: UE 4.9
Tags:
more ▼

asked Nov 18 '15 at 03:30 PM in C++ Programming

avatar image

chriis.aburto
11 5 4 7

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/Timers/index.html

you can do that, or count down in tick, if you want something like, player need to stand 2 seconds near the power up to collect it, then you got to do it in tick

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AActor/Tick/1/index.html

more ▼

answered Nov 18 '15 at 04:26 PM

avatar image

appipapi
36 1 6

avatar image chriis.aburto Nov 18 '15 at 09:33 PM

thanks for that, and yeah, basically once the pickup spawns a timer would countdown like 3 seconds and when those seconds are over, the player would be able to pick it up (this is where i'll flip some bools) thanks for the references

avatar image appipapi Nov 19 '15 at 09:58 AM

then you are better of with timers then with doing it in tick, if your question was answered now, please mark this question as answered, if you have further questions about how to do that with c++ go ahead and ask them

(comments are locked)
10|2000 characters needed characters left
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