This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.

Bz setPlayerShotType: Difference between revisions

From BZFlagWiki
Jump to navigation Jump to search
No edit summary
Zehra (talk | contribs)
redirect, since functions are in official docs
Tag: New redirect
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{BZFS_API_Doc}}
#REDIRECT [[Category:BZFS API Docs]]
{{BZFS_API_Funcs}}
==Prototype==
BZF_API bool bz_setPlayerShotType( int playerId, [[bz_eShotType]] shotType );
==Parameters==
{| border="1" cellpadding="20" cellspacing="0"
  !name
  !type
  !value desription
  |-
  |playerId
  |int
  |the player that is to get the defined shot type
  |-
  |shotType
  |[[bz_eShotType]]
  |the 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.

Latest revision as of 02:50, 25 November 2025