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"

Latency/ping

Hi, is there a way to get the current latency/ping in milliseconds with the blueprints?

Product Version: Not Selected
Tags:
more ▼

asked Oct 18 '14 at 05:53 PM in Blueprint Scripting

avatar image

Scienziatogm
396 44 40 51

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

1 answer: sort voted first

How about the Ping from APlayerState?

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/APlayerState/Ping/index.html

Could that help :X I don't know much about the ping in UE4.

more ▼

answered Oct 19 '14 at 06:27 PM

avatar image

eXi
6.8k 333 185 470

avatar image Scienziatogm Oct 19 '14 at 06:58 PM

I already tried it, but it gives errors:

alt text

screen.jpg (185.0 kB)
avatar image eXi Oct 19 '14 at 07:02 PM

Accessed None normaly means that your PlayerState variable is empty. Did you set it?

avatar image Scienziatogm Oct 19 '14 at 07:08 PM

I did this on MyCharacter:

alt text

The Int Ping variable (SET) is linked to Event Tick.

screen.jpg (48.4 kB)
avatar image eXi Oct 19 '14 at 07:23 PM

I mean your Player State variable. Did you set it somewhere? In that screenshot you just use it, where did you set it?

avatar image Scienziatogm Oct 19 '14 at 07:36 PM

If I search Player state, I can find only Get Player State, not Set Player State.

avatar image eXi Oct 19 '14 at 07:38 PM

Hm ok, can you make a "IsValid" check on the PlayerState before using it please? Drag the PlayerState wire and search for "IsValid". Put it in between the tick and the Set Int Ping. To be sure the Variable is valid before using it.

avatar image Scienziatogm Oct 19 '14 at 07:58 PM

Ok, now it works. But why I've got 24ms in LAN?

alt text

screen2.jpg (458.2 kB)
avatar image eXi Oct 19 '14 at 08:14 PM

Could be. I don't know if how networking works deep in the engine.

If you are connected to the localhost it should be 0, but it could also go over the router to your provider and back. I really don't know how this works xD

Is the ping at least changing a bit?

I'm glad that you even get something to work xD

avatar image Scienziatogm Oct 19 '14 at 08:44 PM

I've got a problem: sometimes the ping is always 0 even if I connect to a dedicated server (not on my PC).

avatar image eXi Oct 19 '14 at 09:18 PM

Not on your pc means outside of the network or only a second pc?

I dont know if a dedictaed server handels theis differently.

avatar image Scienziatogm Oct 19 '14 at 09:27 PM

Outside of the network.

(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