How do I make it so that my char only moves left and right with the arrow keys?

Started by JennaAbbott, Wed 20/05/2009 12:13:15

Previous topic - Next topic

JennaAbbott

I only want my character to move left and right, and to be controlled by the arrow keys.
Also I want to know how to make a default action (look, pick up etc) so the action will be carried out by double clicking on the object. :) Thanks

Khris

The first thing can be achieved easily by using and adjusting the built-in keyboard movement module.
At the beginning of its rep_ex, there's a block where the module checks for keypresses. Simply remove all the other directions.

Implementing a default action can be done using Custom Properties.
In the global on_mouse_click, get the object under the mouse cursor, read its default action stored in the property, then call ProcessClick using an appropriate cursor mode.

SMF spam blocked by CleanTalk