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
|
|
In response to Mechanios
|
|
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(). |
In response to Garthor
|
|
Hey Garthor, can you explain how the Get_out verb works?
|
In response to Delita12345
|
|
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.
|
In response to Garthor
|
|
where do i have to define the name var?
|
In response to Delita12345
|
|
No, just change it.
|
In response to Garthor
|
|
Thanx Garth!
|
In response to Delita12345
|
|
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...) |
In response to digitalmouse
|
|
You are correct digitalmouse.
|
verb
Getin()
usr.icon_state="car"
thats one way if you have a 1 character in ur game