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
flag notice :P

 
Post new topic   Reply to topic Printable version
 View previous topic  Scoreboard... Post :: Post How do I fix this  View next topic  
Author Message
rahXephon
Novice


Age:39
Gender:Gender:Male
Joined: Mar 14 2003
Posts: 31
Location: USA NY
Offline

PostPosted: Thu Apr 10, 2003 10:17 pm    Post subject: flag notice :P Reply to topic Reply with quote

ok lets say there are 3 sections in a map..and in each section there is a flag. What i want to do is to have the bot display who has taken which flag from which section :X
_________________




each square represents a flag

f.bmp - 24.21 KB
File downloaded or viewed 31 time(s)
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
k0zy
Server Help Squatter


Gender:Gender:Male
Joined: Jan 11 2003
Posts: 571
Location: Germany
Offline

PostPosted: Fri Apr 11, 2003 5:58 am    Post subject: Reply to topic Reply with quote

Use EVENT_FlagGrab

When u have 3 flags, then u have 3 flagIDs (f->ident)

something like
Code: Show/Hide

Switch (f->ident)
{
  case 0:
  {
    String s;
    s = p->name;
    s += " has taken first flag";
    sendPublic(s.msg);
  }
  break;
  case 1: {...} break;
  case 2: {...} break;
}


Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole....
Back to top
View users profile Send private message Add User to Ignore List
rahXephon
Novice


Age:39
Gender:Gender:Male
Joined: Mar 14 2003
Posts: 31
Location: USA NY
Offline

PostPosted: Mon Apr 14, 2003 5:07 pm    Post subject: Reply to topic Reply with quote

I am adding onto the ctf plugin and catid uses the team name and the flag coords to define the difference between the flags like this :

Under:
case EVENT_FlagGrab:
Code: Show/Hide
         String s;
         s += "FlagGrab: ";
         s += p->name;
         s += ", ";
         s += f->ident;
         s += ", ";
         s += f->team;
         s += ", ";
         s += f->x;
         s += ", ";
         s += f->y;
         tell(makeEcho(s));

         if (!enabled || !me) break;

         if (p == me)
         {
            if (!validTeam(p->team))
               break;

            setts.Teams[p->team].flag_state = STATE_Carried;
            setts.Teams[p->team].player_ident = p->ident;

            break;
         }

         for (int team = 0; team < NUM_TEAMS; ++team)
         {
            if (setts.Teams[team].flag_state == STATE_Dropped)
            if (setts.Teams[team].flag_ident == f->ident)
            {
               if (setts.Teams[team].move_state == STATE_Static)
               {
                  String s;
                  s += "*arena ";
                  s += p->name;
                  s += " (team ";
                  s += p->team;
                  s += ") stole team ";
                  s += f->team;
                  s += "\'s flag.";
                  sendPublic(SND_TrebleBeep, s);

                  setts.Teams[team].timer = setts.Timer;
               }
               else
               {
                  sendPrivate(p, "*shipreset");
                  setts.Teams[team].move_state = STATE_GonnaDrop;
               }

               setts.Teams[team].flag_state = STATE_Carried;
               setts.Teams[team].player_ident = p->ident;
            }
         }
      }
      break;


how can I enter this code and still keep the original flags :X
Code: Show/Hide
         Switch (f->ident)
{
  case 0:
  {
    String s;
    s = p->name;
    s += " has taken first flag";
    sendPublic(s.msg);
  }
  break;


Looks simple but im stupid icon_redface.gif
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
rahXephon
Novice


Age:39
Gender:Gender:Male
Joined: Mar 14 2003
Posts: 31
Location: USA NY
Offline

PostPosted: Mon Apr 14, 2003 5:07 pm    Post subject: Reply to topic Reply with quote

im going to try myself tongue.gif but...
Back to top
View users profile Send private message Add User to Ignore List Visit posters website AIM Address
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: 150 page(s) served in previous 5 minutes.

phpBB Created this page in 0.480010 seconds : 30 queries executed (94.4%): GZIP compression disabled