File mods/spawn_usher/spawnusher.lua
Functions
spawnusher.activate (require_air_bubble_size, retry_time) | Activates the spawn usher system. |
spawnusher.is_air_bubble (start_pos) | Tests if the given position is an air bubble big enough. |
spawnusher.move_later (player, current_pos) | Schedules the player to be moved later. |
spawnusher.move_player (player) | Moves the player to a safe location. |
spawnusher.move_players () | Move all players that could not be placed so far. |
Functions
- spawnusher.activate (require_air_bubble_size, retry_time)
-
Activates the spawn usher system.
Parameters
- require_air_bubble_size: Optional. The size/height of the bubble of air that is required for the player to spawn. Defaults to 2.
- retry_time: Optional. This is the time that passes between tries to place to the player.
- spawnusher.is_air_bubble (start_pos)
-
Tests if the given position is an air bubble big enough.
Parameters
- start_pos: The position at which to check.
Return value:
true if at the given position is an air bubble big enough. - spawnusher.move_later (player, current_pos)
-
Schedules the player to be moved later. Also moves the player to the given position.
Parameters
- player: The player object.
- current_pos: The current position to which the player will be moved.
- spawnusher.move_player (player)
-
Moves the player to a safe location.
Parameters
- player: The player object.
- spawnusher.move_players ()
- Move all players that could not be placed so far.