Where should my client send event to?
zhuchun
✭
Hi, I'm trying to make am authoritative game as a Plugin, since game-logic is on the server-side, it's not necessary to send events to everyone, right? But It doesn't make sense to send his/her event to the master client, then where should it be sent?
0
Comments
-
Hi @zhuchun,
You can send events to anyone or to none.
You can choose whatever target from client side and the plugin can just stop the event from reaching that target by callinginfo.Cancel()
to silently skip forwarding/relaying the events.
You can also choose to identify the server/plugin as a special target, try Actor Number 0 (didn't test it and not sure if it works) or you can set an interest group that no client is subscribed to.0 -
Thank you! The first one is simple & easyJohnTube said:Hi @zhuchun,
You can send events to anyone or to none.
You can choose whatever target from client side and the plugin can just stop the event from reaching that target by callinginfo.Cancel()
to silently skip forwarding/relaying the events.
You can also choose to identify the server/plugin as a special target, try Actor Number 0 (didn't test it and not sure if it works) or you can set an interest group that no client is subscribed to.
Will try and update soon
UPDATE:
Send to ActorNr==0 and info.Cancel() both work.1