Is there a way to move my mob to a vehicle, for instance, and then have him get inside? I know i'll have to attach the verb to the vehicle. But how would I give the control of the vehicle to the mob who got in? I think I could either
move the mob's location to null or have it contained by the vehicle. Someone please point me in the right direction.
ID:176951
![]() Nov 25 2002, 10:22 am
|
|
That has nothing to do with vehicles, that just changes the icon_state of a person with a verb.
mob car verb Get_in() set src in oview(1) usr.loc = src usr.client.mob = src Get_out() var/mob/M = locate() in src M.loc = src.loc usr.client.mob = M Also, you'll want to have login and logout messages changed to client/New() and client/Del(). |
Oops, just realized you have to set the name var. Besides that, it first locates the mob that is in your contents (since you're the car). Then, it places the mob outside of the car, and switches you to it.
|
You can also check out a neat library/demo from Sapphiremagus: http://www.byond.com/hub/ hub.cgi?qd=hubIndex;hub=1523;channel=1182
It allows you to enter a vehicle, *and* move around inside the vehicle too (if I remember correctly - have not played with that in some time...) |
verb
Getin()
usr.icon_state="car"
thats one way if you have a 1 character in ur game