ID:152477
 
When you choose to move an atom, what is the order that the various movement procs are called.

For example, you want to move south.
Is it like:

1.South()
2.Enter() //Check to see if it can move south
3.Exit() //Check to see if it can leave its current place
4.Move() (or Step()?)//Move it
5.Entered()
6.Exited()

Am i missing a step there or maybe they are out of order?

And lets say I wanted to see a list of all the objects in a turf before the atom moved, would the Enter() proc be the one I would want to edit?
Debug it :P
1.client.South()
2.client.mob.Exit()
3.client.mob.Enter()
4.client.mob.Move(SOUTH)
5.client.mob.Exited()
6.client.mob.Entered()


1. When you push the down arrow it calls client.south.

2. Then it checks to see if the mob can leave the square it is in.

3. Followed by checking to see if it can enter the square below.

4. Then it moves you there.

5. Then it checks to see what happens when you leave that square.

6. Finally checking to see what happens when you enter the next square.

(I believe this is the proper way things work. You can always check this by making a turf and giving it an output message for each of those procs and it will help tell you which way the procs are called)

§atans§pawn
1) Client.South()
2) atom/Move()
"First call src.loc.Exit(). If that succeeds, call NewLoc.Enter(). If that succeeds, set src.loc to NewLoc. Otherwise call src.Bump() if there is a blockage. If dir is zero, re-orient the src to reflect the direction of motion; otherwise re-orient the src to the specified dir."
3) Exited()
4) Entered()

Move handles checking Enter() and Exit(). Enter() would be what you want if you want to allow/disallow them to enter the turf (by return 1/0). If you just want the list, Entered() should work fine.