Hello all,
I have a question about dedicated Server:
How can I run locomotion in a dedicated Server?
Thanks all!
Hello all,
I have a question about dedicated Server:
How can I run locomotion in a dedicated Server?
Thanks all!
I have another question: If i run a function on server from client, for example:
file.h
UFUNCTION(reliable, Server, WithValidation)
virtual void Servertest();
file.cpp
void AMyCharacter::Servertest_Implementation()
{
// some logic
}
bool AMyCharacter::Servertest_Validate()
{
//some logic
return true;
}
the function Servertest_Validate run on server or on client?
Thanks again.
Anyone can help me please?
I’m actually not sure where the Validate function is run, I suspect they might run on both. You can simply test it, by printing the Role of the executing part to the console.
_Validate runs on the server and if it returns false, it resets the client.
I suggest you start here: https://docs.unrealengine.com/latest/INT/Gameplay/Networking/index.html
ok very thanks!
But for this question "How can I run locomotion in a dedicated Server? " anyone can help me?
anyone can help me please?
There is a tutorial about this. Most of the built in stuff for Pawns and Characters already have built in movement on the server with client side smoothing in between updates from the server. You usually just have to set bReplicates to true in the constructor of the class.
The tutorial (more of a theory discussion) is found here: https://wiki.unrealengine.com/Authoritative_Networked_Character_Movement & https://docs.unrealengine.com/latest/INT/Gameplay/Networking/CharacterMovementComponent/