Difference between revisions of "Bz fireWorldWep"

From BZFlagWiki
Jump to: navigation, search
(Add some more information)
(Added missing parameter, Changed page style to match newer pages)
Line 1: Line 1:
{{apicall
+
{{BZFS_API_Doc}}
| name          = bz_fireWorldWep
+
{{BZFS_API_Funcs}}
| description  = Fires a world weapon.
+
==Prototype==
| param1        = flagType
+
BZF_API bool bz_fireWorldWep ( const char* flagType, float lifetime, int fromPlayer, float *pos, float tilt, float direction, int shotID , float dt );
| param1type    = const char*
+
==Parameters==
| param1desc    = Flag type the world weapon will fire with.
+
{| border="1" cellpadding="20" cellspacing="0"
| param2        = lifetime
+
  !name
| param2type    = float
+
  !type
| param2desc    = How long the world weapon will "live".
+
  !value desription
| param3        = *pos
+
  |-
| param3type    = float
+
  |flagType  
| param3desc    = Position the world weapon will fire from.
+
  |const char*  
| param4        = tilt
+
  |Flag type the world weapon will fire with
| param4type    = float
+
  |-
| param4desc    = The tilt of the weapon in radians.
+
  |lifetime
| param5        = direction
+
  |float
| param5type    = float
+
  |How long the world weapon will "live".
| param5desc    = The direction of which to fire the world weapon in radians. (rotation)
+
  |-
| param6        = shotID
+
  |fromPlayer
| param6type    = int
+
  |int
| param6desc    = Shot ID of the world weapon. Each shot is given a unique shot ID for shot tracking.
+
  |Player ID that fired the shot, or BZ_SERVER.
| param7        = dt
+
  |-
| param7type    = float
+
  |*pos  
| param7desc    = Delay time. How many seconds the weapon waits before firing.
+
  |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
 +
  |Shot ID of the world weapon. Each shot is given a unique shot ID for shot tracking.
 +
  |-
 +
  |dt
 +
  |float
 +
  |Delay time. How many seconds the weapon waits before firing.
 +
  |}
 +
 
 +
==Description==
 +
This API function will fire w worldweapon at the specified location with the specified parameters.

Revision as of 01:22, 1 July 2011

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_fireWorldWep ( const char* flagType, float lifetime, int fromPlayer, float *pos, float tilt, float direction, int shotID , float dt );

Parameters

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 Shot ID of the world weapon. Each shot is given a unique shot ID for shot tracking.
dt float Delay time. How many seconds the weapon waits before firing.

Description

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