ID:156801
 
How can I check if my character has stopped moving? And how can I make something happen when it is true?
I believe you would have to directly modify Move()
atom/movable
Move(NewLoc, Dir)
if(!(..(NewLoc, Dir)))
src << "Oh no! You cannot move!"

This is untested. It would be much better if you explained the situation a bit more. If you are using step(), an alternative is to check if step() failed.
In response to GhostAnime
I'm using the pixel movement demo that Forum_account released yesterday. What I'm trying to do is when the player stops moving to change their icon to the standing one. Basically I'm wondering how to check if I'm standing.
In response to DisturbedSixx
I suggest using a macro loop. When the movement key is pressed, change your icon state. When it is released, change it back.
In response to Kaiochao
Can you please show me an example of how to do that?
In response to GhostAnime
GhostAnime wrote:
..(NewLoc, Dir)


You should avoid specifying arguments yourself within ..() calls whenever possible, since doing so can cause the parent proc to lose any additional arguments passed that may not even be used by the current override. For example:
atom/proc/P(a,b,c)
if(a && b && c)
world << c
return 1

mob/P(a,b)
. = ..(a,b)
if(.) del src


In this example, the 3rd argument is lost when the proc executes for mobs. This wouldn't happen if the parent call in the override was just "..()".
So specifying arguments manually in ..() causes you to lose robustness that ..() has by default. You can, however, avoid this problem if you pass different arguments to ..() using both args and arglist().

<small>EDIT: Oops, left 'proc/' in the override after copypasta</small>
In response to Kaioken
Ah, never knew about that. Thanks ^_^
In response to DisturbedSixx
you can do this

mob/verb
Northstart()
src.icon_state="moving"
//put your pixel code for north movement
//if you have one movement code you could do
usr.pixel_direction="north"//or the way you change the direction
usr.pixelmove()
Northstop()
src.icon_state=""
//here nothing or something when movent stops

then you define Northstart command to up key macro repeat, and Northstop to up key macro release, while editing the interface.
YOu'll have to do this for all directions. There are other ways, but i think this is the simplest.
In response to Karffebon
I've already got it handled by changing the icon_state in client/North() and so forth and then adding another macro to change the icon to stop when the key is released. Thanks for the help regardless.