ID:264949
 
Code:
obj
boat
icon = 'turfs.dmi'
icon_state = "boat"
density = 0
movable = 1
locked = 0
maxpassengers = 1
animate_movement=SYNC_STEPS
verb/Get_On()
set src in oview(1)
if(!src.ison && src.currentpassengers < src.maxpassengers)
view(src) << "[usr] climbs aboard [src] and rides as a passenger!"
usr.vehicle = src
usr.loc = locate(src.x,src.y,src.z)
src.currentpassengers += 1
src.ison = 1
verb/Get_Out()
set src in view(0)
if(usr.vehicle == src)
view(src) << "[usr] gets off the [src], leaving an extra space for a new passenger!"
src.currentpassengers -= 1
src.vehicle = null
walk_rand(usr,2)
sleep(2)
walk(usr,0)

New()
.=..()
var/obj/A=new/obj/boattop
A.pixel_y+=32
A.icon_state="boattop"
src.overlays+=A
src.density=0
spawn()
AI()


Problem description:
I'm sure there is a cleaner way of doing this cause looking at this right now it looks really messy but anyways the problem I am having is when I GetOut of the boat I cannot move my character. I can Board the ship and watch my character move with the ship but when it comes time to get off it says I get off the ship but I no longer can move my character.

EDIT, forgot this.
    boat/Move()
..()
for(var/mob/M in world)
if(M.vehicle == src)
M.loc = locate(src.x,src.y,src.z)
what does <<ison = 1>> do ?

would it not be a good idea to look at the Move() proc for mob, to see if something is disabeling movement there?

Another thing i notice is that you use:

Get_On()
usr.vehicle = src

// then on get_out

Get_Out()
src.vehicle = null

// and u also don't have any ison = 0 on get out?


Might this have something to do with it?


In response to Narutostory
Oh I removed src.ison, guess I didnt update it