Right now my code is as follows:
atom/var/obj/ship
turf
Ships
controll_panel
icon='inner ship.dmi'
icon_state="control panel"
density=1
verb
Controls(mob/M)
set src in oview(1)
M=usr.Ship
if(usr.key==M.Pilot)
if(M.Where=="Planet")
usr.Options=input("Do you wish to ascend?","Ascend?") in list("Yes","No")
if(usr.Options=="No")
return
else
M.Ox=M.x
M.Oy=M.y
M.Oz=M.z
M.loc=locate(35,185,3)
M.Where="Orbit"
usr<<"The [M.Name] has moved to Orbit."
return
if(M.Where=="Orbit")
usr.Options=input("Do you wish to descend or pilot?","Descend/Pilot?") in list("Descend","Pilot","Cancel")
if(usr.Options=="Cancel")
return
if(usr.Options=="Descend")
M.loc=locate(M.Ox, M.Oy, M.Oz)
M.Where="Planet"
return
if(usr.Options=="Pilot")
if(usr.Piloting==0)
usr.Piloting=1
usr.client.eye=M
usr.client.cont=M
usr.client.perspective=EYE_PERSPECTIVE
return
else
usr.Piloting=0
usr.client.eye=usr
usr.client.cont=usr
usr.client.perspective=EYE_PERSPECTIVE
mob
var
Ship
Piloting
Options
Name
Owner
Pilot
Access
Where
Ox
Oy
Oz
Ships
Deadly_Lion
icon='ships.dmi'
icon_state="4"
Name="Deadly Lion"
Where="Planet"
Owner="VolksBlade"
Pilot="VolksBlade"
Access= list("VolksBlade")
verb
Enters()
set name="Enter"
set src in oview(1)
if(usr.key in src.Access)
usr.Ship=src
usr.loc=locate(121,108,2)
For that bit it is a but weird to me.. I have it set and all of that, and it works, it DOES work.. but if you save and relog and go to pilot the ship again, it goes and brings you to a black screen as if ship is not specified. The only reason I can think of that would be what is causing it is the atom is not saving, as it is a atom var and not a mob var.
Onto my second thing, the actual "How To..?"
This game is supposed to be realistic, this feature would add realism, and add immersion (good reason right?) well I need to generate a set layout onto a certain Z on my map file so that when a player say buys a ship a new interior of the ship will be made and all of that. I have seen some demo's showing how to do that but they were really complicated to me, anyone care to explain to me how to do this simply?
Third thing, how would I change from one Status layout to another? Say the player starts piloting, instead of his stats and info in the Status tab it will be the Status of the ship? Is it even possible?
Thanks.
[....Snip....]
First, you already have a ship variable defined for atoms, why re-define it (but capitalized) for mob?
Second, you shouldn't lump ship variables on the basic mob type. Instead, you already have a mob/Ships, why not define variables at that level?
Third, as you have a reference variable, simply use that to output status messages.
All in all, you're doing this the hard way :) Try organizing things a little more logically (for example, anything that references a ship should be expecting a mob/ship, or some such, instead of just mob). As it stands you could technically pilot another player!
If you're using statpanels (which I recommend against now that we have interface controls), you might try this:
Good to see that there'll be a use for my revamping of the vehicle library =P