Im trying to implement this dash function and its working on the host side but not the client side. I tried with repnotify and multicasting either way its the same result. I’ve had the dash function do stuff like print strings or spawn actors and in that case it is working properly so it most be something with the movement component. On the client side it seems like they start to dash then get moved back in place. I’ve set the movement component to replicate and checked that the system isnt overcorrecting it, I’m not sure what could be causing it now
Input Dash → Apply Dash to local client → RPC Server
Server → Apply Dash to server proxy
done.
I tried it, it didn’t work I showed below how I implemented it. Is this how you meant or did I do something wrong?
Bruh you can’t apply a delay before calling the server.
Also replication only works Server → Client. So setting a replicated bool client side does nothing.
Don’t duplicate code if you don’t have to.
Servers process should always match the clients.
Use Timers instead of delays for cooldowns, action lockouts etc.
I didn’t really have my cooldowns set up properly cause I couldn’t even get the client to dash once, which is why its set to dash whether its true or false for Dash in Cooldown? But I will keep in mind trying to use timers instead and to not use delays . Also if I can run events on the client side and then the server side why/when should I use multicast? Also I found the problem for the client not moving, I use the last input vector for the impulse added. However when the server runs the dash function, the last input vector isn’t getting gonna get replicated over to the server side. I confirmed this with a print string showing the server impulse will stay 0. How should I go about sending that information to the server before running the dash function server side? Could i just add an input pin to the server dash and plug the last input vector from the client dash to it?
Also thank you so much for the time in your responses btw I really appreciate it and how you sent the example code
If you want the server to maintain authority then it has to derive its own values for actions.
Post your vector code.
I did it this way using repnotify and its working perfectly on both sides, the scale of this game will be very tiny, but I’m unsure if this is an unoptimized way to do it, where if I do this on bigger games it will be a bad way to do it.
Doing it this way result in the client being the authority over the movement. Effectively the client can cheat.
You’re also heavily dependent on low pings. The dash for high ping players will not be responsive. It’ll feel like there’s input lag.
I’m just making a game for me and my friends to play online I don’t really plan on realizing it to more people so I’m not worried about cheating.
I’ll implement it another way to avoid the lag but thank you for your responses and time
Input Dash → Apply Dash to local client → RPC Server
Server → Apply Dash to server proxy
done.