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"

Do I need to check this boolean every tick?

Hi There,

Quick question. If I have a function that needs a tick, but the function only needs to be executed under specific conditions, do I leave a boolean check running on the tick at all times, or is there a better way to do this?

Any insight is appreciated. Thanks.

Edit: To be clear, the boolean itself doesn't need to be checked every tick, but once it's true, the function will need the tick.

Product Version: UE 4.7
Tags:
more ▼

asked May 18 '15 at 11:33 PM in Blueprint Scripting

avatar image

PixelOmen
617 21 16 35

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

1 answer: sort voted first

It may be simplest to just check the flag every tick if once the flag is true they it really is something that needs to be done in tick.

But, if it's something that doesn't need to be done every tick once the flag is true then it would be better to use a timer. You can set a timer to check if the condition is true every x time, if it is, then it can do the operation.

more ▼

answered May 18 '15 at 11:41 PM

avatar image

mikepurvis
2.5k 102 67 261

avatar image PixelOmen May 18 '15 at 11:43 PM

Yes, to be clear, once it's true, it does need the tick. I just don't need to check the flag every tick, if that makes sense.

avatar image mikepurvis May 18 '15 at 11:58 PM

It's probably best just to check the flag every tick. Abstracting away from it, will have it's own cost.

(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