Author |
Message |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Mon Nov 03, 2003 6:07 pm Post subject: Moving Flags |
 |
|
|
|
OK, I'm trying to make the bot just grab a flag and put it somewhere. I know I gotta use EVENT_GrabFlag, but what next? I was looking for a move bot event or something, but there isn't one. Can someone guide me on how to do this (or just send me the CTF source )?
I'm probably just missing something easy.  _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him. |
|
Back to top |
|
 |
ExplodyThingy Server Help Squatter
Age:38 Gender: Joined: Dec 15 2002 Posts: 528 Location: Washington DC Offline
|
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Mon Nov 03, 2003 6:37 pm Post subject: |
 |
|
|
|
Lol, wow. All I needed was the me->move part, but that'll save me a lot of time. Thanks a lot! |
|
Back to top |
|
 |
k0zy Server Help Squatter

Gender: Joined: Jan 11 2003 Posts: 571 Location: Germany Offline
|
Posted: Tue Nov 04, 2003 12:43 am Post subject: |
 |
|
|
|
Tell me if it worked...
I tried to code such a bot once, but i couldn't get it to move more than 6 flags at a time.
Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole.... |
|
Back to top |
|
 |
Dustpuppy Server Help Squatter

Age:40 Gender: Joined: Jan 23 2003 Posts: 215 Location: England Offline
|
Posted: Tue Nov 04, 2003 8:16 am Post subject: |
 |
|
|
|
That's catid's flagmover. It only moves one flag at a time though IIRC. |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Tue Nov 04, 2003 7:42 pm Post subject: |
 |
|
|
|
Actually, Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole...., I only need it to move 1 flag at a time. Sorry. |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Wed Nov 05, 2003 10:22 pm Post subject: |
 |
|
|
|
OK, I got everything done, thanks for your help. Except, the bot doesn't spec after it moves the flag.
void botInfo::change_flag(int ident, int team)
{
tell(makeShip(SHIP_Warbird));
tell(makeTeam(team));
tell(makeFollowing(false));
tell(makeGrabFlag(ident));
tell(makeFlying(true));
me->move(setts.base_x * 16, setts.base_y[team] * 16);
tell(makeSendPosition(true));
tell(makeDropFlags());
tell(makeShip(SHIP_Spectator));
tell(makeFlying(false));
tell(makeFollowing(true));
} |
The bot will do another change_flag, so it is completing, but it just doesn't spec. I'm probably making a stupid mistake, but usually other people catch em more easily.
Thanks,
Cyan |
|
Back to top |
|
 |
Dustpuppy Server Help Squatter

Age:40 Gender: Joined: Jan 23 2003 Posts: 215 Location: England Offline
|
Posted: Thu Nov 06, 2003 6:23 am Post subject: |
 |
|
|
|
You've moved some of the tell() statements (specifically makeFlying() and makeFollowing()). Make sure they are in the same places as in the code 'splody posted. |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Thu Nov 06, 2003 6:14 pm Post subject: |
 |
|
|
|
Thanks, but that's not the problem. (I tried messing with the order before.) This is very odd... |
|
Back to top |
|
 |
Splody Guest
Offline
|
Posted: Fri Nov 07, 2003 7:51 am Post subject: |
 |
|
|
|
Order, definately wrong.
switch makeFlying and makeGrabFlag, remove makeDropFlags |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Fri Nov 07, 2003 4:48 pm Post subject: |
 |
|
|
|
OK, yeah, I changed that, but it does the same thing.
First of all, I need DropFlags because I want the bot to drop owned flags not neuted ones.
And Second, everything is working fine except spectating. The bot drops the flags owned, in the right place, and even spectates just for like a millisecond (The Spectator sign flashes for a sec), and then goes to 512,512 and stays there. |
|
Back to top |
|
 |
|