ID:261528
 
I'm using Deadrons Character Handling, and it works fine, but not when I use the delayed movment demo. For some reason when I have this code in my game....

mob/var
Speeding = 0
Rundelay = 2

mob/Move()
if(Speeding <= 0)
Speeding = 1
..()
sleep(Rundelay + 2) //Set this to different settings to control how slow the mob walks.
Speeding = 0
else
return 0

mob/Login()
Speeding = 0
..()

whenever I log in, I always start out on (1,1,1). How can I modify this so that Deadrons Character Handling still works? Thanks.
This is my demo, I use both Char handeling and this demo in Takayen (Thats where I got it from), and it works just fine. So I think somewhere you have a src.loc = locate(1,1,1) or whatever it might be, but just incase, I will look at Char handeling and my demo, and Ill see if somewhere they collide. If they do i will update the demo and tell you.
In response to Kunark
No, I don't have src.loc = locate(1,1,1) in my code. I have src.loc = locate("Start"). When I don't use your demo, I can have my guy login wherever I want, and then when I log out and log back in with the same guy, have him start out in the same spot as when I logged out. But when I use your demo, I always start at (1,1,1). I don't know...I'll look for something though. Thanks
In response to The Wizard of How
Your not including it are you? Its a demo not a library so I have a page of coding in it (demo.dm) that has a src.loc = locate(1,1,1)... Is that what your looking for, because I see nowhere in char handeling or my demo that the two collide.
In response to Kunark
No, I'm not including it. I just retyped the code that was in there, into mine.
In response to The Wizard of How
I see the problem. Sense CH uses in line 66 of implimation.dm, Move instead of loc = locate. try replacing string 66 of implimation.dm with:


loc = destination


instead of:

Move(destination)



Try that and see how it works. As you probably must know, the reason this is happening is because MoveDelay screws with that procedure to make a delay on it. Well sometimes it isnt called by the person pressing the arrow keys. In cases like this it is returning the proc right at the end without moving them so then somewhere a backup loc is taking effect.