hmm I think you could use a mouse event listener with lua to check current y position of the character & the x position of where you click the cursor & then combine the 2 to replace the destination y position with the characters current y position & the x position where we clicked the left mouse button.
-- let's create some variables for storing stuff in
local char = game:getLink(VGameCurrentCharacter) -- link to current character
local charPos = 0 -- init character position
local curPos = 0 -- init mouse cursor position
-- let's create the function for the mouseEvent listener!
function onMouseEvent(eventType, mousePosition)
-- on left mouse button down (pressed)
if eventType == eEvtMouseLeftButtonDown then
charPos = char:getPoint(VCharacterPosition).y
curPos = getCursorPos().x
end
-- on left mouse button up (released)
if eventType == eEvtMouseLeftButtonUp then
char:setValue(VCharacterDestination, {x=curPos, y =charPos})
end
end
-- let's create the mouseEvent listener
registerEventHandler("mouseEvent", "onMouseEvent", {eEvtMouseLeftButtonDown, eEvtMouseLeftButtonUp})
I don't know if this is correct as I've written it straight from my noggin' to the code box here, but it should be something like - more or less!
Long story short: we listen for left mouse button down... in which we get & store the characters y position & the cursors x position which we then use to set the new character destination on left mouse button up.
If I'm correct then it should completely cancel out the y axis. (might be a bit of an aggressive solution though?)
One other thing: SimonS posted a method a little while ago about controlling the character - somewhat - via key input with the arrow keys or whichever you decide to assign.
http://www.visionaire-studio.net/forum/thread/keyboard-movem...