Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Moving flags in Mervbot?

 
Post new topic   Reply to topic Printable version
 View previous topic  TM_Mer Creds problemos... Post :: Post Anyone use the AI plugin?  View next topic  
Author Message
CommieCausey
Newbie


Age:41
Gender:Gender:Male
Joined: May 27 2006
Posts: 10
Location: California
Offline

PostPosted: Sat Jan 13, 2007 3:46 pm    Post subject: Moving flags in Mervbot? Reply to topic Reply with quote

What is a proper way to move flags in mervbot? When I move flags they don't reappear for a long time.

Here is the code of my function that moves flags:

Code: Show/Hide

void botInfo::moveFlag(Flag *f, int destx, int desty)
{

tell(makeFollowing(false));
tell(makeFlying(true));

tell(makeShip(SHIP_Warbird));

me->move(f->x, f->y);
tell(makeSendPosition(true));
tell(makeGrabFlag(f->ident));

me->move(destx*16, desty*16);
tell(makeSendPosition(true));
tell(makeDropFlags());

tell(makeShip(SHIP_Spectator));

tell(makeFollowing(true));
tell(makeFlying(false));

}


I have tried messing with following and flying and other things. I didn't find any mervbot code for moving flags. I think I mostly copied the ballmover plugin. I wish the CTF plugin had source code included.

I am a newbie with server settings so maybe that is the problem? I have tinkered with them to get the flag to not reset on drop, and be unowned when dropped but I can't get them to reappear faster.

CC
Back to top
View users profile Send private message Add User to Ignore List Send email
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sat Jan 13, 2007 6:29 pm    Post subject: Reply to topic Reply with quote

I think your problem is probably that you're changing ships as you drop the flag. Try dropping the flags then changing back to spec 1 tick later or something.

(PS: Use ASSS.)
_________________
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
View users profile Send private message Add User to Ignore List Visit posters website
CommieCausey
Newbie


Age:41
Gender:Gender:Male
Joined: May 27 2006
Posts: 10
Location: California
Offline

PostPosted: Sun Jan 14, 2007 11:59 am    Post subject: Reply to topic Reply with quote

Hrm I tried it but it didn't work any better. I had the flag move step by step by responding to the FlagGrab event by moving to the upper-left corner and dropping the flag. The flagdrop event then finishes the whole process. I still get the same results. I have also tried not spectating at all but the flag still takes a little while to reappear. Thanks for the help though! I will keep messing with it...

(yeah I wish I could use ASSS!!)

CC
Back to top
View users profile Send private message Add User to Ignore List Send email
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Sun Jan 14, 2007 1:11 pm    Post subject: Reply to topic Reply with quote

Do you have all the proper CTF settings set?
Quote:
; Required settings:
; [Flag]FlagDropDelay=? <- Set really high
; [Flag]CarryFlags=2 <- Only carry one flag at a time, important if one flagger kills another flagger
; [Flag]FlagMode=1 <- Warzone style
; [Flag]FlagReward=0 <- Never win jackpot
; [Flag]FlagTerritoryRadius=0 <- The bot needs to drop flags with precision
; [Flag]FlagTerritoryRadiusCentroid=0 <- ditto

; Recommended settings:
; [Flag]FlaggerOnRadar=1 <- So people can compete
; [Flag]NoDataFlagDropDelay=32767 <- Bot may have trouble with this
; [Flag]FlagBlankDelay=32767 <- Bot may have trouble with this
; [Team]MaxPerTeam=255
; [Team]MaxFrequency=2 <- Bot may have trouble with this
; [Flag]MaxFlags=2 <- Bot may have trouble with this
; [Team]DesiredTeams=2


And why can't you use ASSS?
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Mon Jan 15, 2007 5:03 am    Post subject: Reply to topic Reply with quote

Here's some code I found: (I didn't write it)
Code: Show/Hide
   case EVENT_Tick:
      {
         for (int i = 0; i < 5; ++i)
            --countdown[i];

         // resume spectating
         if (!countdown[0])
         {
            tell(makeFollowing(true));
            tell(makeFlying(false));
            tell(makeShip(SHIP_Spectator));
         }
...
   case EVENT_FlagMove:
...
                     if (countdown[0] <= 0)
                     {
                        tell(makeFollowing(false));
                        tell(makeFlying(true));
                        tell(makeShip(SHIP_Warbird));
                        countdown[0] = 1;
                     }

                     tell(makeTeam(fident));
                     tell(makeGrabFlag(fident));
                     me->move(info->xAtRest * 16, info->yAtRest * 16);
                     tell(makeSendPosition(true));
                     tell(makeDropFlags());

Note this bot is for CTF, so you can get away with tell(makeTeam(fident)) (using flag ID as freq number).
_________________
ss news
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
CommieCausey
Newbie


Age:41
Gender:Gender:Male
Joined: May 27 2006
Posts: 10
Location: California
Offline

PostPosted: Tue Jan 16, 2007 1:25 pm    Post subject: Reply to topic Reply with quote

Okay I got it fixed. It was server settings after all. I had FlagMode set to 0 and it would take a little while for the flags to drop. I then set FlagMode to 1 and flags would reset to the middle of the map with their team changed. I even modified the settings like you suggested but it was still messed up.

I started over with a new server package and it works fine now. I compared the .cfg's but I don't know what was wrong... Owell! I screwed them up somehow.

Thanks for the help. Sorry to be a pest.
Back to top
View users profile Send private message Add User to Ignore List Send email
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Bot Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 44 page(s) served in previous 5 minutes.

phpBB Created this page in 0.502549 seconds : 31 queries executed (94.9%): GZIP compression disabled