i am new to the engine and trying to use blueprints to make a player dash. when the player wants to dash the BP calls a run on server custom event which increases the max speed and acceleration of the character movement and adds an input vector for a few frames using the add input vector node. the dash works on the host but on clients it seems like the add input vector is not working.
When it comes to networking, things might be more complex. I suspect it could be related to network synchronization. Try searching for the replicate-related properties in the component’s Details panel and check if any of them need to be enabled.Your class’s member variables might also need to have their Replication properties set in order to sync with the client.
I’m going to assume you are using one the engines default character projects as the base (First/Third person). Correct me if I’m wrong.
These utilize the Character Movement Component (CMC) to move the pawn and are networked for base movement. CMC uses client-side prediction (CSP), which in a nutshell is the client applies moves on input, then RPC’s server the action. Server then does the same move and compares location/velocity results. If they differ enough the server will send a correction.
Based on this you need to use the same principles for custom movement.
Client: Input → Can I do this → Do it → RPC Server
Server: Can I do this → Do it
If the server deems you cannot do it, or your end location doesn’t match it will correct.
This is the standard networking model for the vast majority of games. Client Fakey → Server Authoritative. You want your client to apply the logic immediately on input to increase responsiveness.
The same applies to a degree for gameplay actions (non-movement related). With Gameplay actions such as world interaction (looting, doors etc) the client checks if it can be done, if so it plays a montage/V/A FX, then rpc’s the server to check and try. The server validates that it can be done, then does it. It in turn replicates the result. Note the client in this scenario does not apply gameplay changes. Only the server does.