ID:272083
![]() Mar 23 2008, 8:08 pm
|
|
I can find nothing to help me on this base... Can somebody please give me a hand?
|
Okay. I already have a movement proc, so according to this all I do is add onto it sleep(var) after the point where the mob moves and then just modify the var to the movement delay I want the mov to have?
|
you also have to do a variable set and return like i did to stop it from getting backlogged with movement attempts which would simply cause a lead time and wouldnt give you the desired effect.
|
I'm sure you can find a zillion discussions on this topic if you search for the right words on the forum.
"Move delay" would be a good place to start. |
Ah... I never learnt to search on the forum for old topics. Thanks for the tip, I'll make sure to check old topics as well as demoes and libraries on this subject.
|
I find a boolean "walking" variable to always be inferior to a "nextstep" variable:
mob/var |
Okay.
1. Moving now. 2. I see no difference. 3. My runtime messages are appearing in my output. So, no offence or anything, but I'm going to stick with the method Masterdan gave me. |
You will see no difference when you are playing single player. The difference comes once you host a game with over 20+ players(rough estimate it may be less). I will bet you that someday using the sleep() method for movement delay will backfire(i.e. Having sleep()s stack upon each other). But then again, who am I to decide for you?
|
If you have a system of saving the mob, you can do this to break Masterdan's code:
Set movement delay to 2 seconds (just so it's easier for you). Move. Before the 2 seconds are up, log out. Now, log back in. Whoops! You can't move! Ever! |
thats the basic idea of it, you override Move to create a a way to control how often you can step. Setting mdelay to 0 will cause no difference in behavior from regular move, setting it to any number higher than that will cause it to wait that many ticks before letting you walk again.