ID:179812
 
What would the proc be to check if a mob is moving or not? Sorry about all the questions but the reference doesnt tell you everything.
if(Move())
In response to Foomer
Foomer wrote:
if(Move())

Hmmm that simple? I thought Move() by itself was useless. Oh well thats cool.
In response to BurningIce
Oh, well, if you want it to be useful, try something like

if(step(usr,NORTH))
In response to Foomer
Foomer wrote:
Oh, well, if you want it to be useful, try something like

if(step(usr,NORTH))

I knew it wasn't that easy. And I expected step to be in it to.
In response to Foomer
Foomer wrote:
Oh, well, if you want it to be useful, try something like

if(step(usr,NORTH))

Uhh that just makes me start out facing north(this is in Login()).
In response to BurningIce
Why would you be moving in login?

Whatsmore, if you relocated in login, why would you want to if it?

[Edit] Also, you know how to do it. What you do with it is totally up to you.
In response to Foomer
Foomer wrote:
Why would you be moving in login?

Whatsmore, if you relocated in login, why would you want to if it?

Ok heres my proc

mob/proc/Stamina_Rise()
for()
if(client.Move())
return 0
else
for()
if(usr.stamina<=usr.max_stamina)
sleep(30)
usr.stamina++
else
return 0


i think you might be able to see what i want done but if not ill tell you. If your moving i don't want your stamina to rise.
In response to BurningIce
Put some code into the Move() proc that checks if ismob(), and if so make a custom mob variable and set that variable to 1 every time they move.

Then, in the regenerate proc, check to see if that variable is 0, if so, continue, if not, don't add health. Then set the variable to 0, so it will be 0 until the next time they move.
In response to Foomer
Foomer wrote:
Put some code into the Move() proc that checks if ismob(), and if so make a custom mob variable and set that variable to 1 every time they move.

Then, in the regenerate proc, check to see if that variable is 0, if so, continue, if not, don't add health. Then set the variable to 0, so it will be 0 until the next time they move.

is this what you mean because it doesnt work

mob/proc/Stamina_Rise()
for()
if(usr.Move())
if(ismob(1))
usr.move=1
else
for()
if(usr.stamina<=usr.max_stamina && usr.move==0)
sleep(30)
usr.stamina++
else
usr.move=0
In response to BurningIce
No, that's not what I mean. Read it again.
In response to Foomer
Foomer wrote:
No, that's not what I mean. Read it again.

Well I have no idea what ismob() does the refrence barley says anything abouti and its not even in the blue book.
In response to BurningIce
It should be pretty obvious if you think about it.

if(ismob(usr))

if, is a mob = usr,
or,
if usr is a mob.
In response to Foomer
Foomer wrote:
if(Move())

It should be noted that this does not really determine if a mob is moving. It attempts to actually move the mob, and returns true if successful.