- Home /
RPCs & Mecanim - Animations sometimes wont Fire
Hi there,
I have my animations hooked up with mecanim using Triggers, and my network is using uLink, so when I use an animation I send an RPC to trigger it on the proxy and a lot of the time it works fine. But if I run around on one client and watch on the other, everything looks alright with the running animation, but if I sit there spamming the "Evade" button for example sometimes the animation doesn't fire on the proxy.
The events are listed here for firing the animations. First the player evades, so it tells the server he's evading, which tells the proxies he's evading. This is an authoritative server setup similar to an MMO so the client can't tell the other client's he's evading.
[RPC]
void ProxyTriggerAnimation(string trigger)
{
anim.SetTrigger(trigger);
}
[RPC]
void TriggerAnimation(string trigger)
{
anim.SetTrigger(trigger);
networkView.UnreliableRPC("ProxyTriggerAnimation", uLink.RPCMode.Others, trigger);
}
networkView.UnreliableRPC("TriggerAnimation", uLink.NetworkPlayer.server, "Evading");
Answer by Vire · Jan 29, 2014 at 09:50 PM
This has been solved ; it was because I was using unreliableRPCs instead of RPCs. I know the difference now.