Server Help

Bot Questions - Powerball

CypherJF - Sat Feb 28, 2004 11:28 pm
Post subject: Powerball
MervBot: what would be the best way to determine if a player is carrying the ball for like # seconds?
SuSE - Sun Feb 29, 2004 12:16 am
Post subject:
um, start a timer for x seconds when they pickup the ball? sa_tongue.gif
CypherJF - Sun Feb 29, 2004 1:40 am
Post subject:
What if they throw it :/ and what if theres 2 more balls or w/e :/ LOl akai... im not _that_ dumb icon_smile.gif
Cyan~Fire - Sun Feb 29, 2004 10:52 am
Post subject:
Well I'm not sure about this (I've never used the soccer functions of MERV), but the PBall struct has a 'carrier' member. Possibly have the bot check every EVENT_BallMove and see if there is a carrier.
50% Packetloss - Mon Mar 01, 2004 1:47 am
Post subject:
Code: Show/Hide

struct PBall
{
   Uint16 x, y;
   Sint16 xvel, yvel;
   Uint16 team;
   Uint16 ident;
   Uint16 carrier;
   Uint32 time;         // Local timestamp on event (not constant)
   Uint32 hosttime;      // Remote timestamp on event (constant until new event)
   Uint32 lastrecv;      // Last update recv time (for timeout)
};


test out some of those time variables, i have no idea what catid's comments mean so its trial and error. If worse comes to worse, you can keep track of EVENT_BallMove , the ball->carrier will be ==0xFFFF if the ball is uncarried. Else it will be the p->ident of the player
Smong - Mon Mar 01, 2004 11:30 am
Post subject:
Also I think if the ball is being carried, time will be 0.
Mr Ekted - Mon Mar 01, 2004 6:01 pm
Post subject:
Code: Show/Hide
PID   TIME      MEANING
FFFF  00000000  ball removed from play
FFFF  xxxxxxxx  ball set/spawned
xxxx  00000000  ball carried by pid
xxxx  xxxxxxxx  ball passed by pid

All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group