Giving wws a user

Questions, comments, and news on the server side plug-ins and it's API
Post Reply
darkid
Private First Class
Private First Class
Posts: 131
Joined: Wed Aug 12, 2009 5:03 pm

Giving wws a user

Post by darkid »

I know that in a few plugins, such as turretcontrol, kills via the ww are attributed to a player. However, the wwzone plugin is *much* more customizable. Could anyone write (or modify) a plugin to allow this?
Darkid--Not a happy camper.
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Giving wws a user

Post by blast »

I think that having the WW be tied to a user causes the scores to get out of sync in 2.0.x. Basically, each client keeps track of their own score. So if a world weapon kills 30 people for a specific player, that player will see their score as 30 points lower than everyone else sees their score. So, I would recommend not doing that until version 3.0.0 comes out.
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
darkid
Private First Class
Private First Class
Posts: 131
Joined: Wed Aug 12, 2009 5:03 pm

Re: Giving wws a user

Post by darkid »

Haven't noticed that in flying popcorns shooting gallery, or that *antiquitous* dodge trainer, the one with the tower and the machine guns.
Darkid--Not a happy camper.
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Giving wws a user

Post by blast »

So you've run two clients and compared what you see?
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
darkid
Private First Class
Private First Class
Posts: 131
Joined: Wed Aug 12, 2009 5:03 pm

Re: Giving wws a user

Post by darkid »

no... i've noticed that my score increases normally when i'm in the turret, or when others are.
i.e. +1 for *every* kill
Darkid--Not a happy camper.
Enigma
Private First Class
Private First Class
Posts: 212
Joined: Sat Apr 23, 2005 3:13 am

Re: Giving wws a user

Post by Enigma »

It has been a while since I looked at the plug-in API, but I think it depends on how you change the score. I know the functions for setting scores are out of sync. If, however, you use bz_killPlayer(), the scores will be in sync. Also, you can use the playerDieEvent to change the killerID when someone dies. If we change the killerID when a WW kills someone, we can *give* the kill to anyone. I believe the scores are updated as well. The trick (hack) is to use a list of predefined shot ID's for the WW, then check for those shot ID's in the die event.
Post Reply