mob
Move()
if(Riding==1)return
return ..()
mob/var
Riding = 0
turf
Train_point
obj
icon = 'Objects.dmi'
Train
Train1
icon_state = "T1"
density = 1
verb/Ride()
set src in oview(1)
alert("You stagger up onto the platform and look around. Are you sure you want to board the train?")
switch(input("Are you sure you'd like to board the train?","Train")in list("Yes","No"))
if("Yes")
if(usr.Riding==1)
src << "You're already riding the train!"
else
src << "You decide it's time to board the train."
usr.loc = locate(/turf/Train_point)
usr.icon = 'Objects.dmi'
usr.icon_state = "T1"
usr.Riding = 1
walk(usr,WEST,1)
var/obj/A = new/obj/Train/Train2(usr.loc)
var/obj/B = new/obj/Train/Train2(usr.loc)
var/obj/C = new/obj/Train/Train3(usr.loc)
walk_to(A,usr,1,0)
walk_to(B,A,1,0)
walk_to(C,B,1,0)
sleep(600)
usr.icon = 'Mobs.dmi'
usr.icon_state = "Normal"
if("No")
return
Train2
icon_state = "T2"
density = 1
Train3
icon_state = "T3"
density = 1
Problem description:
My train decided it doesn't want to move. >.>
Extra Information:
Well, it's a pretty simple process(I thought). You go to the front of the train and then use the Ride verb. It then changes you into the icon of the front of the train, transports you onto a spot on the map, creates the rest of the train which then follows you, and is supposed to move you forward! However, I've noticed two things wrong with this code. For one, I'm pretty sure that making them unable to move will affect the chances of the "Walk" proc. However, I need them to be unable to move, or it could mess up the track the train goes on and cause bugs later on. So I looked up "Walk" using F1, but I still couldn't fix it. So I removed freezing them completely, but it still wouldn't work. So I have to figure I'm using "Walk" incorrectly. I'm still relatively new to programming on BYNOD, but I'm trying my best to get better at it. Perhaps there's an easier way to do this? I really don't know. But if you can help me that'd be really great.
Yes, there's one of your problems. The truth is that this overriding mob/Move() approach to preventing movement is a very poor solution, which creates problems just like what you can see here. What you want is not to make the mob completely locked in place and unable to be moved by everything, you just want the mob to be unable to move himself. For players, this can be done by overriding the client/Move() proc instead, which governs what happens when a player sends a movement command in an attempt to move his mob. So it applies for player-initiated movement only.