ID:912656
 
Keywords: help, keyboard, movement
(See the best response by Albro1.)
Problem description:
Eh i was wondering if anyone could show me a resource that could help me with the following:

allowing you to take over a npc and moving it (with keyboard)


i have a click movment code, but i think the keyboard movement would be more useful. anything for my problem would be greatly appreciated.
thanks in advanced.
Best response
You can set the client's mob variable to the new mob. Keep in mind that doing this will call your current mob's Logout() and the new mob's Login().

You could also assign a variable to the client that stores the mob that you are controlling. Then in the client's movement procs(North(), South(), etc), you can check if you are controlling a mob. If you are, move that mob. If not, do the default action.
In response to Albro1
Albro1 wrote:
You can set the client's mob variable to the new mob. Keep in mind that doing this will call your current mob's Logout() and the new mob's Login().

You could also assign a variable to the client that stores the mob that you are controlling. Then in the client's movement procs(North(), South(), etc), you can check if you are controlling a mob. If you are, move that mob. If not, do the default action.

iight thanks for the help.

No problem! Remember to vote up the best response whenever you ask for help, so that the members who search for their problems before asking find answers easier!
In response to Albro1
It's easier to override client/Move() than each directional process individually, and also cuts down on redundant code.