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"

Get DateTime from internet.

Hope it's the right section to post this... this is my first question.

Hi everyone. I'm developing a mobile game in wich there is an upgrade system. The player starts the upgrade and then waits (or he could spend gems or similar currency to skip the time). The problem i came up with, is that the blueprints (such as UTCnow and Now) can get only the DateTime based on the system's. This is easily cheatable: the player could change the time on his device, catch the reward and then return the time right. To avoid this i thought about getting DateTime from a server (for example NTP cause it's free) and store it in a variable when the player launches the game... but i can't find any useful resource online.

I would like to understand if this could be possible and: -how to connect to a server (especially an NTP one) in ue4. -gather DateTime from that server and store it in a variable. I can learn C++ if it's needed.

Thank you in advance, hope to hear from you soon!

Product Version: Not Selected
more ▼

asked Jun 19 '19 at 07:22 PM in Using UE4

avatar image


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

1 answer: sort voted first

Hi,Sbro987!Well basically you can use the HTTP module from Unreal Engine, to send the POST or GET request and get your timestamp from server and at start of the game you can check it and make a check. A little help link to start you with Http Module. https://wiki.unrealengine.com/Http-requests After that you can make a server on whatever you backend language you want and send it back to the users.

more ▼

answered Jun 19 '19 at 07:45 PM

avatar image

Maksym Nosatov
511 3 3 4

(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