Closed mkafrin closed 3 years ago
Will need to add the ability to broadcast to server to create or destroy a zone on everyone's client.
Alternative implemented in 24931b1d8b061f0655168aec041f67083456d334
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.
Implemented in 1c0c3fced3948ba2245ed4455eb2f7f99c4ca201 and 7063fd57a5f55b31294b0a6826059a267eec8dfe
The server should know what players are in what zones so events can be sent to everyone in or outside of a zone.
Alternative: