Maybe avoid setting then direcly from input events which might not exist server-side as well as animation blueprint does not exist server-side (which is a class btw, same as any other blueprint or C++ class, they all classes) because obviously server does not need it as it does not render anything. Put fire action as a function which can be replicated and then call it on key events.
I use blueprint interface to send message , from Controller to animationBP
for example , Controller have event that detect the fire button is pressed , and by using blueprint Interface
I sent the bool to animationBP , and trigger the state .
however it won’t work on server side , only local effect .
I know it’s the “sending Variable by Blueprint interface” goes wrong , because other animation without it , work fine .
This is Mycharacter , I set those variable to be sending .
And this is my AnimationBP event graph , I simply exec the bpi funcion to get those variable update .
Is there any way to fix it ? or simply I shouldn’t send variable by BPinterface ?
I tried the “Jump event” , it went fine with jump action , both server side and client , but even if I use Jump key to trigger my variable change , they still won’t be sending correctly but only the client side wrok . I think it’s not because of the input event . but still thanks for the clue .
I wonder if I set the interface incorrect , so here is my Blueprint Interface
I simply just set four output variable .
and from MyCharacter , I added Interface into it and set the function to be like
Simply what I want is just sending variable , and it work fine with local side
just not for the server …
I think interfaced functions are made in to nodes similar to events
Which mean blueprint interface totally isn’t functioning on server side ?
Is there any other sending methods that could work on server ?
Finally I found a solution , it’s not like what I was thinking
First I thought , If variable work Online just fine , it should be replicated right .
but to send them out of the BP , that’s whole other thing .
what I do is
first always set them inside “Custom event” which been set “Run on server”
then , use those well set variable by interface function in my AnimationBlueprint
it will work as I expected
The solution I got is from here
link text
Well , now I know you’re right at the first place , eventually , I use key input to trigger the custom event , then set the variable which is about to send inside a event . this could make sure variable is server side sync , other detail is in my other answer .