|
|
| (3 intermediate revisions by 3 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]]
| |
| |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.
| |