View Single Post
Old 06-30-2003, 06:38 PM   #4
karlan
Member
 
Join Date: Apr 2002
Location: Brisbane Australia
Posts: 74
karlan is on a distinguished road
Arrow

From the sounds of it you would want bhoth situations, it is pointless having a separate room for say a motorbike, and it is unrealistic to have 10 people visible in an APC, so for larger vehicles you will want the multiroom setup, and what ever code is required to show it.
EG: APC: visible driver, and commander (guy with MG you see sticking out top), anyone inside generally isn't visible

for the simpler motorbike you could have a few pointers in your char data, and object data [code] struct char_data *riddenBy, *ridingChar;
struct object_data *ridingObj; // in char data struct

AND
struct char_data *riddenBy; // in obj struct
[/quote]

I would recommend against using objs as vehicles, make them mobs, and have a flag (INANIMATE ??) to say the mob does nothing, but make it a mob so it has moves, and HP's that way it can wear out, and be destroyed.

then in show_char_to_char (or whatever it is called, I can't remember) do a check to see if a vehicle/mount is ridden
[code]
// ... stuff up here already exists, for loop (i) to loop through chars in room
....
} else if (if (IsMount(i) &&  (i->riddenBy))
{
   // skip this char
  break;
} else if ((i->riding) && (CanBeSeen(i) || CanBeSeen(i->riding)))
{
  sendToChar(ch, "%s is here riding %s\r\n", GetName(i), GetName(i->riding));
  continue;
} else if (.....
[/quote]

there are quite a few other things that are then required, special procs to "refuel" (feed) your vehicle, mount/unmount commands, stop INANIMATEs from self regen on MV's and HP's and so on...
karlan is offline   Reply With Quote