Edited the title to help anyone thinking about it in future:
What could cause Server functions not to trigger? I have replication in dozen other classes and it all works fine but here the server ones just don’t trigger. Am a bit tired already today but am I missing something obvious?
Client that is also listen server succesfully destroys the items, and it replicates properly.
On a Client that is not listen server the functions never trigger.
On Clients running on Dedicated server the functions never trigger.
Didn’t help sadly. It seems to be trace related issue that I couldn’t trace (pun not intended) down yet. It works fine if I call the same function on overlap in the same class.
Trace Hit (in another class) returns correct item instance, also the debug line drawn by DrawDebugLine is drawn correctly, but calling the function cross-class somehow makes it botch the job with actually executing the function serverside.
Hi Rama, Im trying to figurate something out, you said “If you are going to call a server function cross class you have to first go server side on the class you are currently in!” and “Class A local (non server) calls Class A server function to then call Server function in Class B”. This is fine is you want to call just some server side function and thats all.
But, what happen if you dont want to execute server function of other class directly and first you want to execute a client function that returns some parameter to finaly pass it to the server function?. I mean, Class A local (non server) calls Class A server function, then call client function of Class B that returns some parameter to pass it finally to a server side function also in class B. Im not sure if im explaining well. This question is also extended to all calls that can be done after the final server function.
If you are going to call a server
function cross class you have to first
go server side on the class you are
currently in!
Here’s the work flow I have
experienced to be necessary time after
time
again the scenario is calling a server
function in Class B from Class A
here is what I do
Class A local (non server) calls Class
A server function to then call Server
function in Class B
I can’t say this is required in every
case, in fact I am sure it isnt, but
if ever cross class server function is
not working, try my above flow
I’ve had to use it many times!
Rama
Just marking it as answer for visibility, since it doesn’t seem possible to mark comment as answer. (If there is a way please let me know and I’ll fix it.)