TW_MonitorPositions
Overview
Knowing where players are is critical for various reasons. Where should things spawn? Where shouldn't things spawn?
The GM-Mod introduces a grid-system that allows TW_AISpawnPoints
and TW_VehicleSpawnPoints
to be grouped by grid coordinates.
This enables us to grab upwards of 10s, 100s, 1000s, of spawn points by querying a single coordinate! To grab additional points, it's a matter of x, or y +/- N then combining the results.
Grid Updates
At a regular interval, which the TrainWreck-SpawnSystem
overrides and makes configurable - player positions are checked. Then we iterate over each radius, sending the calculated player chunks to subscribers.
Subscribe
The TrainWreck-SpawnSystem
mod has two types of positions it cares about. Where to spawn AI and where NOT to spawn AI. Previously, we tried combining these two types. However, we have since separated it. Now each "type" requires you to subscribe to it with a unique name.
So for the spawn system example, we'd have two systems subscribed to two "radiuses", or potentially the same radius!
Registration example
Example of the update event