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

Difference between revisions of "Bz fireWorldWep"

From BZFlagWiki
Jump to: navigation, search
m
(Prototype)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{apicall
+
{{BZFS_API_Doc}}
| name          = bz_fireWorldWep
+
{{BZFS_API_Funcs}}
| description  = Fires a world weapon.
+
==Prototypes==
| param1        = flagType
+
BZF_API bool bz_fireWorldWep ( const char* flagType, float lifetime, int fromPlayer, float *pos, float tilt, float direction, int shotID , float dt , bz_eTeamType shotTeam = eRogueTeam );
| param1type    = const char*
+
 
| param1desc    = Flag type the world weapon will fire with.
+
BZF_API bool bz_fireWorldWep ( const char* flagType, float lifetime, int fromPlayer, float *pos, float tilt, float direction, int *shotID , float dt , bz_eTeamType shotTeam = eRogueTeam );
| param2        = lifetime
+
 
| param2type    = float
+
==Parameters==
| param2desc    = How long the world weapon will "live".
+
{| border="1" cellpadding="20" cellspacing="0"
| param3        = *pos
+
  !name
| param3type    = float
+
  !type
| param3desc    = Position the world weapon will fire from.
+
  !value desription
| param4        = tilt
+
  |-
| param4type    = float
+
  |flagType  
| param4desc    = The tilt of the weapon.
+
  |const char*  
| param5        = direction
+
  |Flag type the world weapon will fire with
| param5type    = float
+
  |-
| param5desc    = The direction of which to fire the world weapon. (rotation)
+
  |lifetime
| param6        = shotID
+
  |float
| param6type    = int
+
  |How long the world weapon will "live".
| param6desc    = Shot ID of the world weapon. Each shot is given a unique shot ID which helps for collision detection (?).
+
  |-
| param7        = dt
+
  |fromPlayer
| param7type    = float
+
  |int
| param7desc    = What is this ???
+
  |Player ID that fired the shot, or BZ_SERVER.
}}
+
  |-
 +
  |*pos  
 +
  |float
 +
  |Position the world weapon will fire from.
 +
  |-
 +
  |tilt  
 +
  |float
 +
  |The tilt of the weapon in radians.
 +
  |-
 +
  |direction
 +
  |float
 +
  |The direction of which to fire the world weapon in radians. (rotation)
 +
  |-
 +
  |shotID
 +
  |int (or int * for second version)
 +
  |Shot ID of the world weapon. Each shot is given a unique shot ID for shot tracking. For the second version a pointer to an int that will contain the generated shot ID.
 +
  |-
 +
  |dt
 +
  |float
 +
  |Delay time. How many seconds the weapon waits before firing.
 +
  |-
 +
  |shotTeam
 +
  |bz_eTeamType
 +
  |Team color of the weapon. (Rogue by default)
 +
  |}
 +
 
 +
==Description==
 +
This API function will fire w worldweapon at the specified location with the specified parameters.

Latest revision as of 18:43, 19 April 2014

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.

Prototypes[edit]

BZF_API bool bz_fireWorldWep ( const char* flagType, float lifetime, int fromPlayer, float *pos, float tilt, float direction, int shotID , float dt , bz_eTeamType shotTeam = eRogueTeam );

BZF_API bool bz_fireWorldWep ( const char* flagType, float lifetime, int fromPlayer, float *pos, float tilt, float direction, int *shotID , float dt , bz_eTeamType shotTeam = eRogueTeam );

Parameters[edit]

name type value desription
flagType const char* Flag type the world weapon will fire with
lifetime float How long the world weapon will "live".
fromPlayer int Player ID that fired the shot, or BZ_SERVER.
*pos float Position the world weapon will fire from.
tilt float The tilt of the weapon in radians.
direction float The direction of which to fire the world weapon in radians. (rotation)
shotID int (or int * for second version) Shot ID of the world weapon. Each shot is given a unique shot ID for shot tracking. For the second version a pointer to an int that will contain the generated shot ID.
dt float Delay time. How many seconds the weapon waits before firing.
shotTeam bz_eTeamType Team color of the weapon. (Rogue by default)

Description[edit]

This API function will fire w worldweapon at the specified location with the specified parameters.