-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Server-side knowledge of players in zones #12
Comments
Will need to add the ability to broadcast to server to create or destroy a zone on everyone's client. |
Alternative implemented in 24931b1 |
Re-opening for following question: Can this be made better for ComboZones? Maybe someone wants an event tied to a particular zone inside a ComboZone, instead of the whole thing. Can addEvent on ComboZones take an optional zoneName param and then it will call isPointInsideExhaustive() and loop through the returned zones to see if one of the zones' name matches the zoneName param. |
Should this use events all the way instead of callbacks? Meaning instead of passing a callback to addEvent and an event with that name being created on the zone, instead a generically named event (or named based on the zone somehow) is created and called from server-side, then in the event-handler, if the player is in the zone, it then triggers the event with the eventName passed to addEvent. For example, the event you create on the zone can be like "__PolyZone__:{eventName}" and then if the player is in the zone, it triggers the "eventName" event. |
The server should know what players are in what zones so events can be sent to everyone in or outside of a zone.
Alternative:
The text was updated successfully, but these errors were encountered: