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

Editing Bz fireWorldWep

Jump to: navigation, search

Warning: The database has been locked for maintenance, so you will not be able to save your edits right now. You may wish to copy and paste your text into a text file and save it for later.

The administrator who locked it offered this explanation: Archived wiki

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
{{BZFS_API_Doc}}
+
{{apicall
{{BZFS_API_Funcs}}
+
| name          = bz_fireWorldWep
==Prototypes==
+
| description  = Fires a world weapon.
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 );
+
| param1        = flagType
 
+
| param1type    = const char*
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 );
+
| param1desc    = Flag type the world weapon will fire with.
 
+
| param2        = lifetime
==Parameters==
+
| param2type    = float
{| border="1" cellpadding="20" cellspacing="0"
+
| param2desc    = How long the world weapon will "live".
  !name
+
| param3        = *pos
  !type
+
| param3type    = float
  !value desription
+
| param3desc    = Position the world weapon will fire from.
  |-
+
| param4        = tilt
  |flagType  
+
| param4type    = float
  |const char*  
+
| param4desc    = The tilt of the weapon.
  |Flag type the world weapon will fire with
+
| param5        = direction
  |-
+
| param5type    = float
  |lifetime
+
| param5desc    = The direction of which to fire the world weapon. (rotation)
  |float
+
| param6        = shotID
  |How long the world weapon will "live".
+
| param6type    = int
  |-
+
| param6desc    = Shot ID of the world weapon. Each shot is given a unique shot ID which helps for collision detection (?).
  |fromPlayer
+
| param7        = dt
  |int
+
| param7type    = float
  |Player ID that fired the shot, or BZ_SERVER.
+
| param7desc    = What is this ???
  |-
+
}}
  |*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.
+

Please note that all contributions to BZFlagWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BZFlagWiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)

Templates used on this page: