Server Help

General Questions - soccerball eating tiles

SuperDAVE(postal) - Fri Oct 15, 2004 10:35 pm
Post subject: soccerball eating tiles
Is there any other tile that would eat a soccerball other than the goal. I already tested (i think) the special tiles with no luck, they all bounced off.
SuSE - Fri Oct 15, 2004 10:48 pm
Post subject:
No. Make a bot and you can do whatever you want.
Cyan~Fire - Sat Oct 16, 2004 4:56 pm
Post subject:
Why exactly do you want to "eat" balls?
CypherJF - Sat Oct 16, 2004 5:31 pm
Post subject:
Probably like reset the ball if it hits a specific tile... "eat"ing it..
Cyan~Fire - Sun Oct 17, 2004 11:43 am
Post subject:
OK.

Basically what you'll want to do is check the position of the ball on EVENT_BallMove to see if it's in any of the "eat spots". Then send an EVENT_GrabBall to pick it up if it is. Then send an EVENT_FireBall with a random position (as relating to Prize:MinimumVirtual) and a 0 x and y velocity to reset it.
Anonymous - Sun Oct 17, 2004 4:17 pm
Post subject:
So mervbot has the ball physics in it? I've got to see this.
SuperDAVE(postal) - Sun Oct 17, 2004 9:34 pm
Post subject:
Thanks, just wanted to double check with the pros. icon_smile.gif
Cyan~Fire - Mon Oct 18, 2004 4:44 pm
Post subject:
Yeah, the latest DLL event update added in ball events.
Smong - Wed Oct 20, 2004 12:52 pm
Post subject:
I just took a quick look and I can't find any functions that update a balls position and velocity over time.
Cyan~Fire - Wed Oct 20, 2004 6:57 pm
Post subject:
If you don't have the events I mentioned, then your source is obselete.
Bak - Thu Oct 21, 2004 4:23 am
Post subject:
the changelog for build 45 tells nothing of ball physics being added.

SSBot2 (on catid's website) has ball physics. One could use the code from SSBot2 inside mervbot to get an idea of where the ball is.
Cyan~Fire - Thu Oct 21, 2004 5:42 pm
Post subject:
Look in dllcore.h for DLL 6.6 or higher. You'll see the referenced events there.
Bak - Thu Oct 21, 2004 6:31 pm
Post subject:
the event exists, but there is no ball physics. So after you fire a ball the bot will show the position that you fired, and the speed you fired it at, until someone picks it up.

Ball_Move is invoked when:
1. Ball Timer occurs (from settings, default once every 4 seconds)
2. Goal is scored
3. Someone picks up the ball
4. Someone fires the ball

so unless he added phyics and didn't document it, it's not there, even though EVENT_BallMove is.
Bak - Thu Oct 21, 2004 6:32 pm
Post subject:
the event exists, but there is no ball physics. So after you fire a ball the bot will show the position that you fired, and the speed you fired it at, until someone picks it up.

Ball_Move is invoked when:
1. Ball Timer occurs (from settings, default once every 4 seconds)
2. Goal is scored
3. Someone picks up the ball
4. Someone fires the ball

so unless he added phyics and didn't document it, it's not there, even though EVENT_BallMove is.
Cyan~Fire - Fri Oct 22, 2004 5:19 pm
Post subject:
You're not looking in the right enum, then. EVENT_BallMove is in enum Bot2DLL which, of course, are all incoming events.
Here:
Code: Show/Hide
enum DLL2Bot_EventCodes
{
...
//// 6.6 ////
...
   EVENT_GrabBall,
      /*   Grab a ball

         [0] ball id
      */
   EVENT_FireBall,
      /*   Fire the specified ball in a certain direction

         [0] ball id
         [1] x pixel
         [2] y pixel
         [3] x velocity
         [4] y velocity
      */
};

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