Imagine the following custom device:
race_device := class(creative_device):
@editable
RaceManagerDevice : race_manager_device = race_manager_device{}
OnBegin<override>()<suspends> : void =
RaceManagerDevice.RaceBeganEvent.Subscribe(HandleRaceBeganEvent)
HandleRaceBeganEvent(Agent : agent) : void =
# called for every participating player on every client
If this is tested on a published island with two players, then HandleRaceBeganEvent will be called twice on each client. Is there any way to figure which of those two calls is for local player?
In other words, is there any way to know which of the players from the playspace is the player on the client that runs that instance of the code?
For example, Pete and Steve want to play UEFN game and they both connect. Pete is on computer X and Steve is on computer Y. Verse code will execute on each computer. (Or is it server side execution??) On the code instance running on X, I expect to get info that Pete is local player and respective info on computer Y.