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

Difference between revisions of "Bz setPlayerShotType"

From BZFlagWiki
Jump to: navigation, search
(New page: {{BZFS_API_Doc}} {{BZFS_API_Funcs}} ==Prototype== BZF_API bool bz_setPlayerShotType( int playerId, bz_eShotType shotType ); ==Parameters== * playerId ( the player that is to get the d...)
 
Line 4: Line 4:
 
BZF_API bool bz_setPlayerShotType( int playerId, [[bz_eShotType]] shotType );
 
BZF_API bool bz_setPlayerShotType( int playerId, [[bz_eShotType]] shotType );
 
==Parameters==
 
==Parameters==
 
+
{| border="1" cellpadding="20" cellspacing="0"
* playerId ( the player that is to get the defined shot type )
+
  !name
* shotType ( the new shot type to assign to the player )
+
  !type
 +
  !value desription
 +
  |-
 +
  |playerId  
 +
  |int
 +
  |the player that is to get the defined shot type
 +
  |-
 +
  |shotType  
 +
  |[[bz_eShotType]]
 +
  |he new shot type to assign to the player
 +
  |}
  
 
==Description==
 
==Description==

Revision as of 02:34, 14 August 2007

BZFS API Documentation This page contains part of the BZFS API documentation for use by Plug-ins on the BZFS server.
BZFS API Function. This page documents a BZFS_API Function, that is provided by the BZFS game server for plug-ins to call.

Prototype

BZF_API bool bz_setPlayerShotType( int playerId, bz_eShotType shotType );

Parameters

name type value desription
playerId int the player that is to get the defined shot type
shotType bz_eShotType he new shot type to assign to the player

Description

This API function set the current shot type for the player. Any shots fired after the shot type is sent will be of this new type. The function will return true if the player is valid.

Notes

BZFlag 2.1 has the ability to allow a plug-in to modify the shot type of player's tank. The shot type can be independent of the flag is carried. When the shot type is changed, the client will start shooting shots of the new type. Once changed, it is not required to change the shot type of every shot fired as was previously done in older versions.

Any time a player spawns or drops a flag, the shot type if the tank will be reset to the standard shot type for the carried flag.