Author |
Message |
The Cubbies Guest
Offline
|
Posted: Thu Sep 07, 2006 2:16 pm Post subject: make the bot score |
 |
|
|
|
I've been trying to make my bot score a goal for a long while now. Using FireBall doesn't seem to work. The bot fires into the goal, but doesn't score. Is there another way to do this? |
|
Back to top |
|
 |
Maverick

Age:40 Gender: Joined: Feb 26 2005 Posts: 1521 Location: The Netherlands Offline
|
Posted: Thu Sep 07, 2006 2:52 pm Post subject: |
 |
|
|
|
That's odd, I was under the impression a bot wouldn't have any difficulties making a goal when reading the topic title.
(Since a bot should fire the ball the same way any other client does.) _________________
|
|
Back to top |
|
 |
Mine GO BOOM Hunch Hunch What What

Age:41 Gender: Joined: Aug 01 2002 Posts: 3615 Location: Las Vegas Offline
|
Posted: Thu Sep 07, 2006 3:06 pm Post subject: |
 |
|
|
|
Firing balls is for wussies. Real men (and clients) tell the zone when they score, with packet 0x21. Contains one byte after it, saying which ball id. You don't even need to be anywhere near where the goal/ball is at to grab it, shoot it, and score. I'm not even sure you need to fire it, as long as you control it. |
|
Back to top |
|
 |
The Cubbies Guest
Offline
|
Posted: Thu Sep 07, 2006 3:17 pm Post subject: |
 |
|
|
|
Ok, I'm new to programming. I've only made a few bot plugins, and they are the only c++ I've ever done. Could you explain that a little more MGB? Maybe dumb it down a bit. |
|
Back to top |
|
 |
Mine GO BOOM Hunch Hunch What What

Age:41 Gender: Joined: Aug 01 2002 Posts: 3615 Location: Las Vegas Offline
|
Posted: Thu Sep 07, 2006 3:56 pm Post subject: |
 |
|
|
|
There should be a function called something like "ScoreGoal" or some such. This is because balls where a huge hack to Subspace back when it was designed. The server does no physics what so ever, so it has to rely on the client to say when the ball goes into a goal.
Outline of how to do it:
- GrabBall()
- ShootBall()
- ScoreGoal()
I don't know what bot core you are using, so I can't lookup the function names for you. But there should be something that is related to telling the server you score a goal.
If you say which bot core you are using, myself or others can assist better. |
|
Back to top |
|
 |
The Cubbies Guest
Offline
|
Posted: Thu Sep 07, 2006 4:17 pm Post subject: |
 |
|
|
|
I'm using MervCore, I tried:
tell(makeShip(SHIP_Warbird));
tell(makeGrabBall(0));
tell(makeTeam(0));
tell(makeSoccerGoal(0,1000));
and I tried it with a tell(makeFireBall(x,x,x,x,x) in there also.
I couldn't get any of it to work. |
|
Back to top |
|
 |
Cerium Server Help Squatter

Age:42 Gender: Joined: Mar 05 2005 Posts: 807 Location: I will stab you. Offline
|
Posted: Thu Sep 07, 2006 6:03 pm Post subject: |
 |
|
|
|
The server does some basic checks on objects to make sure youre atleast near them to claim them. Make sure you set the bot's position to the location of the ball before attempting to claim it, and -- just to be safe -- make sure no other player currently has control over it.
Beyond that, I believe MGB has it right -- just send the "goal" packet when you want to score.
Just out of curiosity though, why is this necessary? _________________ There are 7 user(s) ignoring me right now. |
|
Back to top |
|
 |
The Cubbies Guest
Offline
|
Posted: Thu Sep 07, 2006 6:57 pm Post subject: |
 |
|
|
|
Well, we have a small soccer arena in 17th, and I'm trying to avoid defensive creasing (I know there are easier ways). Right now I have the bot recognize if the ball changes possesion in the crease, but I'm also writing some logic to have the bot score the goal if it was going in. |
|
Back to top |
|
 |
|