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"

Integer size and timeframes with time of day

Hi there, I have a time of day setup using a timeframe and a timeline to control the position of the sun and moon. The timeframe is being controlled by an "absolute_time" int variable which stores in game seconds. It constantly counts up based on a loop called every 0.1 seconds (to make things go by a little faster). I can "wait" or "sleep" by adding a "wait_time" int variable to "absolute_time" and it update the timeline accordingly for the sun and moon position.

The question is: should I be worried about the "absolute_time" int variable getting too big as time goes on in the game? I was thinking that it could be reset to 0 after each day and then have a separate day variable if int max size could be an issue.

Product Version: UE 4.18
Tags:
more ▼

asked Dec 22 '17 at 12:41 PM in Blueprint Scripting

avatar image

Gampersnaz
80 9 16 24

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

1 answer: sort voted first

Nevermind haha i think i figured out my own solution. I could have a branch that checks the absolute time size. If it is greater than a days worth of seconds, I just subtract a days worth of seconds. That way the wait time carries over to the next day whereas if absolute time was just set to 0 once exceeding the day, wait time would get stuck at midnight.

more ▼

answered Dec 22 '17 at 12:58 PM

avatar image

Gampersnaz
80 9 16 24

(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