API_DOCS: Shot Type controll

Questions, comments, and news on the server side plug-ins and it's API
Post Reply
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

API_DOCS: Shot Type controll

Post by JeffM »

2.1 now has messages and functions that let you modify the shot type of a tank. The shot type is now independent of the flag you carry. When the shot type is changed, the client will pick up on that change and it will start shoting shots of that type. Once changed, you do NOT have to change the shot type of every shot fired. And yes, the shoting client WILL see the modified shot type, so the entire state will be in sync.

Code: Select all

BZF_API bool bz_setPlayerShotType( int playerId, bz_eShotType shotType );
This will set the current shot type for the player. Any shots fired after the shot type is sent will be of this new type.

you can also set the shotType field in the bz_eGrabFlagEvent event, and the shot type will be sent with the flag pickup ( this is the best way to do it ).

Any time a player spawns or drops a flag, there shot type will be reset to the standard shot type, and should be reset, if you want to change the default shots.
ImageJeffM
User avatar
the panda next door
Private First Class
Private First Class
Posts: 42
Joined: Sun Mar 16, 2008 3:55 am
Location: Las Vegas

Post by the panda next door »

How do I change the shot type in 2.0.11 bzfs?
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Post by JeffM »

you can not, it is a feature for 3.0 only (2.1.x used to be the development name for 3.0, but now it's 2.99).
ImageJeffM
Post Reply