Quote:
Originally Posted by diabloNL
Tried that and it didn't work.
I'm using that a lot. So by using for example this in main.xml:
Code:
<function id="doLeft">
{Some code}
</function>
With that you can use your own code that starts when the joystick left is pressed. The PROBLEM here is that I haven't figured out how to call the original function. For example:
Code:
<function id="doLeft">
if (a == 1) {
this.doRight();
}
else {
this.doLeft();
}
</function>
This won't work because it will call it's own function that it's in. Creating a loop. So it's not possible to do the original joystick left function when a !=1 We need to find out how to listen to the keys itself rather then the function they do.
|
just a thought, create a new method with a different name like doLeft2, in there you call this.doLeft(), so you avoid the recursive loop, and map the key to call doLeft2