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"

Character Movement max walk speed replication ?


I'm working on a FPS project with blueprints and I face the following problem : only the player of the listening server can see his max walk speed changing.

Here's the event on the character blueprint and the associated function : alt text

alt text

This is doing great on a listening server, but isn't working on my clients. Why ?

Product Version: Not Selected
event.png (60.3 kB)
runfunction.png (81.1 kB)
more ▼

asked May 25 '14 at 01:22 PM in Blueprint Scripting

avatar image

26 2 3 164

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

1 answer: sort voted first

I'll answer my own question :) I solved the problem with function replication :

On the character : alt text

The "Set Computed Max Walk Speed" function content : alt text

character.png (206.9 kB)
function.png (178.8 kB)
more ▼

answered May 25 '14 at 08:49 PM

avatar image

26 2 3 164

avatar image Hodgeasaurus Oct 24 '14 at 09:07 AM

Hey Fitwizz - I am running into the same issue here, however I lack the brains to understand what you have constructed here. Would you be able to post what steps you took to build the blueprints you posted?

avatar image eXi Oct 24 '14 at 09:30 AM

It has to do with the way how listen servers work.

Only the server is allowed to do stuff. So if a client wants to change a replicated variable, he needs to tell the server to do so.

So what Fitiwizz does is, make a custom event that runs on the server but is called by the client. If the client presses the InputKey for sprinting, the event is called and passes the isSprinting bool. For pressed -> true and for released -> false.

Now, under the Input, you see the red part of the custom event. This runs on the server and sets the replicated variable "isSprinting" to true or false.

Nearly the same happens at the right side of his picture. He calls the custom event that runs on the server to change the movement speed of the Character Component that was passed at calling (so the one of the client).

For this RPC like network system, you need to realize, that every other player than yourself, is only a "bot" moving with the variables that the original one replicates. And the server is able to change variables of all these client bots and also change these variable on every one of your client bots.

So if Client1 Sprints, the server tells Client2 etc that Client1 Sprints. It also allows Client1 to sprint, because it changes the variable for him.

So on the server, you could also run some checks, to make sure that the player is allowed to sprint at all (cheating). But i guess it's fine how he did it (:

avatar image Hodgeasaurus Oct 24 '14 at 10:03 AM

Thanks for the prompt reply there eXi.

That clears up the understanding part very well indeed so a big thanks for that.

The issue of reproducing it still is there though. I'm not sure what Events/Functions/Settings I'm meant to be creating.

Sorry for my basic knowledge!

avatar image intoxicat3 Nov 04 '14 at 02:48 PM

hmn I've the same approach as you did and it isn't working for me using Set Max Fly Speed...max fly speed is only changing in server.

avatar image gonzamancg Nov 07 '14 at 07:29 AM

Yeah same issue here, cant change max fly speed on a client.

avatar image GNUton May 30 '17 at 06:20 PM

That Event tick looks so bad and it's not really needed. The trick is setting the max speed on the client and on the server (the last one through RPC call aka Custom event on server)

(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