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"

Linking a Date/time system?...the noob's back :P

Hello again, my question this time is how would i go about linking a real time/date system to my game? by that i mean so when its certain times of the day in real life then it would change and activate things in the game, (think pokemons day/night system) so only certain event would happen at certain hours or days such as christmas day events? i found a post stating theres a blueprint node for it now but can't find it, also where exactly would i script it, in the level/gamemode/etc blueprint? i realize this is a bit of a vague question but any help would be most appreciated :)

Product Version: UE 4.11
Tags:
more ▼

asked Jan 19 '17 at 12:36 PM in Blueprint Scripting

avatar image

KrakenJon
3 1 2 2

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

1 answer: sort voted first

You can get current time and date using "Now" node,

https://docs.unrealengine.com/latest/INT/BlueprintAPI/Math/DateTime/Now/index.html

it using DateTime type:

https://docs.unrealengine.com/latest/INT/BlueprintAPI/Math/DateTime/index.html

There is no alarm system buildin which would trigger events on time, you sould need to build it yourself. Either you make whole centralized system which would check array of alarms and see if one is trigger and call some event using event dispatcher, or just simply make in classes that needs it a timer that loops every 1 second and check time and do something.

Remember that system clock is not reliable, user can change it as they like so i would not depends game advancement on it, which you could say the same about pretty much all data that comes from user machine. Only way to keep it on guard is to run game instance on server outside of user reach to spoof any data

more ▼

answered Jan 19 '17 at 01:55 PM

avatar image

Shadowriver
37.3k 936 172 1116

avatar image KrakenJon Jan 19 '17 at 02:22 PM

i think i get it, see im not worried if the user changes the date on there computer and by proxy change the date in game, but does that mean i would have the 'now' node linked to to say a 'getdayoftheyear' copied 365 times for each daily event?

(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