How RaiseEvent Actualy work??
Options
I have read documentation related RaiseEvent and i am try it, i know that only execute event send to other player and not sender. who make i am confuse is about RaiseEventOptions . Can anyone give me example how to use RaiseEventOptions pleasee?? because in the documentation say "Calling RaiseEvent with EventCaching.AddToRoomCache, the event will be put into the server's cache. That means, any player who joins later on, will also get the event" what i get from that sentence is if i call PhotonNetwork.RaiseEvent with RaiseEventOptions.EventCaching = EventCaching.AddToRoomCache player who join this room will automaticly execute that event. That right or wrong??
0
Best Answer
-
Hi @doolangames,
Let's clarify few things:
When you use RaiseEvent to send an event there is:- one sender: one actor who sends the event.
- zero or more receivers: target actors who will receive event.
i know that only execute event send to other player and not senderI'm not sure if I got this right but I think it it wrong: you can send an event to yourself or receive it yourself as well. It can be done by changing ReceiverGroup to All or setting your actor number in TargetActors.who join this room will automaticly execute that eventYes as long as the room is still alive and a new actor joins or old actor rejoins it will receive the cached events.
5 - one sender: one actor who sends the event.
Answers
-
Hi @doolangames,
Let's clarify few things:
When you use RaiseEvent to send an event there is:- one sender: one actor who sends the event.
- zero or more receivers: target actors who will receive event.
i know that only execute event send to other player and not senderI'm not sure if I got this right but I think it it wrong: you can send an event to yourself or receive it yourself as well. It can be done by changing ReceiverGroup to All or setting your actor number in TargetActors.who join this room will automaticly execute that eventYes as long as the room is still alive and a new actor joins or old actor rejoins it will receive the cached events.
5 - one sender: one actor who sends the event.
-
Thanks a lot @JohnTube now I understand0