This wiki is archived and useful information is being migrated to the main bzflag.org website

Difference between revisions of "Bz eGetPlayerSpawnPosEvent"

From BZFlagWiki
Jump to: navigation, search
(New page: {{BZFS_API_Doc}} {{BZFS_API_Events}} ==Overview== The '''bz_eGetPlayerSpawnPosEvent''' is an API event that you can use to get and modify a spawn location and is sent just before spawning...)
 
Line 27: Line 27:
 
   |handled
 
   |handled
 
   |bool
 
   |bool
   |Set this flag to true once you're done modifying the spawn position
+
   |Set this flag to true once you're done modifying the spawn position, so that other plugins will know whether they can edit the spawn position again
 
   |-
 
   |-
 
   |pos
 
   |pos

Revision as of 16:39, 28 November 2007

BZFS API Documentation This page contains part of the BZFS API documentation for use by Plug-ins on the BZFS server.

BZFS Event. This page documents a BZFS event that is called by the game server to notify plug-ins of various actions and state changes in the game world.


Overview

The bz_eGetPlayerSpawnPosEvent is an API event that you can use to get and modify a spawn location and is sent just before spawning a player.

Data

bz_eGetPlayerSpawnPosEvent returns the bz_GetPlayerSpawnPosEventData data class.

name type value description
eventType bz_eEventType bz_eGetPlayerSpawnPosEventData
playerID int ID of the player
team bz_eTeamType The team the player belongs to
handled bool Set this flag to true once you're done modifying the spawn position, so that other plugins will know whether they can edit the spawn position again
pos float[3] Position where the player will be spawned
rot float Rotation with which the player will be spawned
time double Time at which this event was sent

Uses

You can use this event to modify a player's spawn location