ID:169624
 
How would I make it to where, when someone takes control of a RC Car, their client.eye is the RC Cars and they can move the RC Car?
src.client.eye=rc_car
In the move proc your going to check to see if they are driving the car or not. If they are, move the car. If not, move the mob.
In response to SuperAntx
How exactly..
In response to Chwgt
Chwgt wrote:
How exactly..

Why not just change client.mob to the RC Car?
In response to Hell Ramen
Look up the North(), South(), East(), West() and all for points in between. By overriding those procedures and using step(), you can remote controle something.
In response to FranquiBoy
I think mob/Move() would be better, less over-ridingish.
In response to Hell Ramen
I tryed that before, but it caused problemes when the mob was moved by other procedures. I find it safer to make a new remote controling procedure with a direction parameter and call that procedure from each direction. It adds 1 line to each directions, not much.
In response to FranquiBoy
Can you show me example?
In response to FranquiBoy
This works perfectly...
world
mob=/mob/player
mob
player
icon='player.dmi'
car
icon='car.dmi'
verb
Enter_Car()
set src in oview(1)
usr.client.mob=src
del(usr)
Exit_Car()
var/mob/player/p=new(locate(usr.x,usr.y-1,usr.z))
usr.client.mob=p
turf
icon='map.dmi'

In response to Chwgt
Actually this is much better --
client/North()
if(src.mob.incar)
step(src.mob, src.mob.dir)
else ..()
client/South()
if(src.mob.incar)
src.mob.dir = turn(src.mob.dir, 180)
src.North()
src.mob.dir = turn(src.mob.dir, 180)
else ..()
client/East()
if(src.mob.incar)
mob.dir = turn(mob.dir, -45)
else ..()
client/West()
if(src.mob.incar)
mob.dir = turn(mob.dir, 45)
else ..()
client/Northeast()
if(src.mob.incar)
step(src.mob, turn(src.mob.dir, -90))
src.mob.dir = turn(src.mob.dir, 90)
else ..()
client/Northwest()
if(src.mob.incar)
step(src.mob, turn(src.mob.dir, 90))
src.mob.dir = turn(src.mob.dir, -90)
else ..()
world
mob=/mob/player
mob
var
dead=0
incar=0
player
icon='player.dmi'
Move()
if(src.dead)
return
else
..()
car
icon='car.dmi'
Bump(mob/player/M)
M.density=0
M.icon_state="Squashed"
M.dead=1
verb
Enter_Car()
set src in oview(1)
usr.client.mob=src
src.incar=1
del(usr)
Exit_Car()
var/mob/player/p=new(locate(usr.x-1,usr.y,usr.z))
usr.client.mob=p
src.incar=0
turf
icon='map.dmi'
In response to Increndium
How is that MUCH better? It's less efficient!
I would just set the mob variable to the car, but if you don't want to do that...
client
var/atom/movable/RC_move
proc/set_RC(atom/movable/M)
eye=M
RC_move=M
Move(loc,dir)
if(RC_move)
.=RC_move.Move(loc,dir)
else
.=..()

Setting the mob variable to the object would accomplish about the same thing.