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
Making lvz images appear

 
Post new topic   Reply to topic Printable version
 View previous topic  A question abut victory music and hum Post :: Post Safety.bmp  View next topic  
Author Message
WarFan
Seasoned Helper


Age:53
Gender:Gender:Male
Joined: Aug 08 2003
Posts: 141
Location: Clinton, Iowa
Offline

PostPosted: Fri Oct 10, 2003 2:49 pm    Post subject: Making lvz images appear Reply to topic Reply with quote

Is it possible to make an lvz image disappear when a ship moves over it and then reappear after it has moved off the image. This would be like for roof tops on building..you would see the roof if you were not in the building, then if you entered it, the roof would disappear. Thanks
Back to top
View users profile Send private message Add User to Ignore List Yahoo Messenger
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Fri Oct 10, 2003 3:01 pm    Post subject: Reply to topic Reply with quote

You would need a bot for that, each object can have a number assigned to it
Code: Show/Hide

Example:
W-183,E1,IMAGE59,TopMost,ServerControlled,0,688


So if you do it manually, *objon 688 or *objoff 688 , logged in as a sysop
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
WarFan
Seasoned Helper


Age:53
Gender:Gender:Male
Joined: Aug 08 2003
Posts: 141
Location: Clinton, Iowa
Offline

PostPosted: Fri Oct 10, 2003 3:06 pm    Post subject: Reply to topic Reply with quote

Couple questions here.

1) So manually, I would get in a building or watch people get in a building and turn the roof image off?

2) Do you know of a bot that does this or something similar?

Thanks
Back to top
View users profile Send private message Add User to Ignore List Yahoo Messenger
SuSE
Me measures good


Joined: Dec 02 2002
Posts: 2307
Offline

PostPosted: Fri Oct 10, 2003 3:11 pm    Post subject: Reply to topic Reply with quote

you just need a bot to privately send "*objon #" or "*objoff #" when a person flies into a certain area

in fact...I bet if you had the source for the TM Baw plugin for MERVBot, you could get it easily adapted for just this purpose
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Fri Oct 10, 2003 4:42 pm    Post subject: Reply to topic Reply with quote

No promisses that ill get it done, but Im editing Baw's source for that purpose. Mostly its just cutting pieces out. Trying to think of how im going to detect when everyone is out of the coord's area so that the bot will do a *objon after that(put the roof back on). I need some damn lunch
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Fri Oct 10, 2003 5:08 pm    Post subject: Reply to topic Reply with quote

I was thinking of doing this in an asss module, but never figured out MGB's sparse array thing (what if you are on the border between two regions?). So my current methods of player position detection are not as efficient as they could be.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
SuSE
Me measures good


Joined: Dec 02 2002
Posts: 2307
Offline

PostPosted: Fri Oct 10, 2003 5:35 pm    Post subject: Reply to topic Reply with quote

50% Packetloss wrote:
No promisses that ill get it done, but Im editing Baw's source for that purpose. Mostly its just cutting pieces out. Trying to think of how im going to detect when everyone is out of the coord's area so that the bot will do a *objon after that(put the roof back on). I need some damn lunch


ya I was wondering about that - it's fine if the person cannot warp out - he just ends up leaving and you have an area which triggers the switch back to the roof on as the person exits...

but...if the person warps out or is killed (etc) then ya...problematic sa_tongue.gif

so it'd probably depend on the specific sets to be used what would be required
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
SuSE
Me measures good


Joined: Dec 02 2002
Posts: 2307
Offline

PostPosted: Fri Oct 10, 2003 5:35 pm    Post subject: Reply to topic Reply with quote

Smong wrote:
I was thinking of doing this in an asss module, but never figured out MGB's sparse array thing (what if you are on the border between two regions?). So my current methods of player position detection are not as efficient as they could be.


cool icon_smile.gif get MGB to spell it out for you
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
Dr Brain
Flip-flopping like a wind surfer


Age:39
Gender:Gender:Male
Joined: Dec 01 2002
Posts: 3502
Location: Hyperspace
Offline

PostPosted: Fri Oct 10, 2003 7:32 pm    Post subject: Reply to topic Reply with quote

Have a hashmap that contains player names, and thier current 'area'. That way, you only need to change things when their area changes. This is how I handle everything with my warper bots, and It works very well.
_________________
Hyperspace Owner

Smong> so long as 99% deaths feel lame it will always be hyperspace to me
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Sat Oct 11, 2003 10:59 am    Post subject: Reply to topic Reply with quote

What if areas overlap? Would you need to create "layers" of areas. So areas cannot overlap unless they are in a seperate layer/hashmap.

I found some doc's on sparse arrays too:
http://www.eecs.harvard.edu/~ellard/Q-97/HTML/root/root.html
Although I probably won't be using one because ops will want to define their own arbitrary areas.

I think I'll go for something like what Dr Brain said.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Sat Oct 11, 2003 12:23 pm    Post subject: Reply to topic Reply with quote

Completed it maybe, have to test it and i bet it will crash all over the place. TM Baw keeps track of an ignore list, list ignored a player for a short amount of time, not sure what exactly it was for, maybe if they spawned in a warp area they had time to move. Pretty much i turned that list into one that would hold players that were inside of a object area(InsidePlayers), specified in the .ini file. Once on the list, i can check to see if you left the area, if you did, i check to see if you were the last one out of the area by cycleing through the InsidePlayers list.

Code: Show/Hide

#pragma pack(4)

struct Obj
{
   Sint32 x1, y1, x2, y2; //holds area of the obj
   bool On_Off; //object's state
   Sint32 objNum; //Holds object number
   Sint32 title; //Holds the area number, found in .ini, ex- [obj0]
};

#pragma pack()

struct InsideEntry
{
   char name[20]; //player name thats inside area
   Sint32 title; //the area he is inside, ex- [obj1] found in .ini

   InsideEntry(char *nname,Sint32 ttitle) //constuctor
   {
      memcpy(name, nname, 20);
      title=ttitle;
   }
};


So if im cycling through all the _linkedlist <InsideEntry> InsidePlayer; i can check if any of them are inside a specific area (title). If they arent in that area, then i get to switch the area's state.

In theory, my code in case EVENT_PlayerMove: should regulate it properly, but im sure i fucked up somewhere and with merv, its endless trial and error to fix something. Going to get food before i test it
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Sat Oct 11, 2003 4:15 pm    Post subject: Reply to topic Reply with quote

Edit:nt

Last edited by 50% Packetloss on Sun Oct 12, 2003 8:54 pm, edited 1 time in total
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:41
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Sat Oct 11, 2003 11:26 pm    Post subject: Reply to topic Reply with quote

I believe your problem is in your loading of the ObjLocations.head, as the ->next at some point in a linked list should be NULL. Post the code of how you read the values. You probably just forgot to NULL the ->next value when you create the new memory.
Back to top
View users profile Send private message Add User to Ignore List Send email
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Sun Oct 12, 2003 2:25 am    Post subject: Reply to topic Reply with quote

ew,thought the class did it for me, ill try it out when im more awake
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Sun Oct 12, 2003 3:12 am    Post subject: Reply to topic Reply with quote

Code: Show/Hide

TEMPLATE void _linkedlist <AnonymousStruct>::append(AnonymousStruct *item)
{
   _listnode <AnonymousStruct> *new_tail = new _listnode <AnonymousStruct> (item);

   new_tail->last = tail;
   new_tail->next = NULL;

   if (head == NULL)
      head = new_tail;
   else
      tail->next = new_tail;

   tail = new_tail;

   total++;
}


Yep, when i append anything it makes the tail->next=NULL
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Sun Oct 12, 2003 3:16 am    Post subject: Reply to topic Reply with quote

Edit: NM, i have no idea where it crashes. It crashes before the CheckInside function is called after i move back outside the obj area. So i move into it and it does the correct thing, then i move back out of it and it crashes before it reaches if (!CheckInside(p->name))

Code: Show/Hide
   case EVENT_PlayerMove:
      {
         Player *p = (Player*)event.p[0];

      if(Enabled)
      {
         _listnode <Obj> *parse = ObjLocations.head; // Holds All the obj locations
         String s; // String for turning on and off objects

         if (!CheckInside(p->name)) //if player isnt inside obj area
         {
            while (parse) //Scroll through obj locations
            {
               if (p->tile.x > parse->item->x1 && p->tile.x < parse->item->x2 && p->tile.y > parse->item->y1 && p->tile.y < parse->item->y2)
               { // Check locations

                  if(!CheckTitle(parse->item->title)) //Is anyone already in the obj area??
                  { 
                     if(parse->item->On_Off) //No one in obj area, switch its state for new person
                     {
                        s = "*objoff "; //object off command
                        parse->item->On_Off=false;
                     }
                     else
                     {
                        s="*objon "; //object on command
                        parse->item->On_Off=true;
                     }

                  }
                  AddInside(p->name,parse->item->title); //Add to inside bot list

                  s += parse->item->objNum; //add on object number
                  sendPublic(s.msg); //send command
                  break; //break out of loop
               }

               parse = parse->next; //go to next positions in list
            }
         }
         else //if the player was inside obj area, see if they are still there
         {
            while (parse) //cylce through locations
            {
               if (p->tile.x > parse->item->x1 && p->tile.x < parse->item->x2 && p->tile.y > parse->item->y1 && p->tile.y < parse->item->y2)
               {
                  break; //they have been found inside, exit the loop
               }
               parse = parse->next;//go to next positions in list
            }

            if(!parse) //if no more locations; then they left the obj area
            {
               sendPublic("*arena You have left the area, removing name");
               RemoveInsidePerson(p->name);//remove them from inside of obj area list
               sendPublic("*arena Name Removed");
               if(!CheckTitle(parse->item->title)) // If no one inside obj area
               {
                  if(parse->item->On_Off) //switch its state becuase everyone left
                  {
                     s = "*objoff "; //object off command
                     parse->item->On_Off=false;
                  }
                  else
                  {
                     s="*objon "; //object on command
                     parse->item->On_Off=true;
                  }
                  s += parse->item->objNum; //add on object number
                  sendPublic(s.msg); //send command
               }
            }
         }
      }


Last edited by 50% Packetloss on Sun Oct 12, 2003 8:54 pm, edited 1 time in total
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Sun Oct 12, 2003 1:11 pm    Post subject: Reply to topic Reply with quote

Added my source, Edit: Cleaned up new parse objects being created in every function, just placed ones i commonly used as private vars. Also place the code into the most recent tutorial version

Last edited by 50% Packetloss on Mon Oct 13, 2003 9:38 pm, edited 1 time in total
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Mon Oct 13, 2003 2:38 am    Post subject: Reply to topic Reply with quote

NM found the problem.

Code: Show/Hide
if(!parseObj) //if no more locations; then they left the obj area
            {
               sendPublic("*arena You have left the area, removing name");
               RemoveInsidePerson(p->name);//remove them from inside of obj area list
               sendPublic("*arena Name Removed");
               if(!CheckTitle(parseObj->item->title)) // If no one inside obj area
               {
                  if(parseObj->item->On_Off) //switch its state becuase everyone left
                  {
                     S = "*objoff "; //object off command
                     parseObj->item->On_Off=false;
                  }
                  else
                  {
                     S="*objon "; //object on command
                     parseObj->item->On_Off=true;
                  }
                  S += parseObj->item->objNum; //add on object number
                  sendPublic(S.msg); //send command
               }
            }
         }

doing a parseobj->item, when parse is NULL here. thats game over for any program
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
lp
Newbie


Joined: Sep 30 2003
Posts: 17
Offline

PostPosted: Tue Oct 14, 2003 3:08 pm    Post subject: Reply to topic Reply with quote

actually, ive already gotten this working really well(roofbot)... but my problem is ... im trying to bring up the images in diagonal slices in certain parts of the level. as in, you could see only what your ship could see.

Anyway... when i try to line up two diagonal images.. i always get an ugly black line along the diagonal. ive tried to invert the selection in PS, ive overlapped selections and i still get the ugly. using standard 8-bit indexed images and such. any help would be greatly appreciated.

leep
Back to top
View users profile Send private message Add User to Ignore List
SuSE
Me measures good


Joined: Dec 02 2002
Posts: 2307
Offline

PostPosted: Tue Oct 14, 2003 3:49 pm    Post subject: Reply to topic Reply with quote

lp wrote:
im trying to bring up the images in diagonal slices in certain parts of the level. as in, you could see only what your ship could see.


uh...attach the images to your next post, I'm having trouble visualizing what you mean (and of course someone will be able to line them up properly for you)
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Tue Oct 14, 2003 4:34 pm    Post subject: Reply to topic Reply with quote

Bot Complete, moved it to bot forum for you Akai

http://forums.minegoboom.com/viewtopic.php?p=10891#10891

Go there to download biggrin.gif
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
SuSE
Me measures good


Joined: Dec 02 2002
Posts: 2307
Offline

PostPosted: Tue Oct 14, 2003 4:57 pm    Post subject: Reply to topic Reply with quote

cool icon_smile.gif
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> LVZ/LVL 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: 1479 page(s) served in previous 5 minutes.

phpBB Created this page in 9.317437 seconds : 46 queries executed (99.5%): GZIP compression disabled