Page 2 of 3

Re: Lua

Posted: Wed May 31, 2017 9:24 am
by Hemmings
xperia64 wrote: Known Issues:
Going through doors with this enabled and the joystick tilted will make the joystick stuck. Just disable and enable the script again.
It's annoying having to do this all the time though.

Re: Lua

Posted: Sat Aug 05, 2017 12:22 am
by dsattorney
Exedion wrote:One question: with lua script can hidden virtual buttons automatically when enter in a battle? That will be a important feature
Can you be more specific?

Re: Lua

Posted: Sun Sep 03, 2017 7:48 pm
by talos91
Could anyone edit the first Lua script so that it moves all four directions with the accelerometer instead of just left and right?

Re: Lua

Posted: Sun Sep 03, 2017 9:55 pm
by dsattorney
Do you understand that most phones do not have a four-way accelerometer? So it's impossible to do a script for your purposes.

Re: Lua

Posted: Mon Sep 04, 2017 6:04 am
by kaikun97
dsattorney wrote:Do you understand that most phones do not have a four-way accelerometer? So it's impossible to do a script for your purposes.
Actually they do, an X and Y axis. What you are probably thinking of is a gyroscopic sensor which has yaw, pitch & roll.
android.get_rotation()
Returns an integer with the current device rotation in degrees.
The range is [0,-180[ for counter-clockwise rotation and [0,180] for clockwise rotation.
However it seems to not be possible anyway since only the X rotation function in the lua code is supported at the moment.

Re: Lua

Posted: Mon Sep 04, 2017 6:59 am
by dsattorney
Well, I guess you learn something new everyday then.

Re: Lua

Posted: Tue Sep 05, 2017 2:28 am
by talos91
kaikun97 wrote:
android.get_rotation()
Returns an integer with the current device rotation in degrees.
The range is [0,-180[ for counter-clockwise rotation and [0,180] for clockwise rotation.
However it seems to not be possible anyway since only the X rotation function in the lua code is supported at the moment.
Exophase any chance you could add Y rotation to the lua code?

Re: Lua

Posted: Tue Sep 26, 2017 7:25 am
by websterek
Hi!

I'm trying to write LUA script for pokemon black/white to show/hide controls in certain moments of the game. How can I debug and get values from this part of NDS memory? Or in other words how to easily debug it?

- drastic.get_ds_memory_arm9_8(address)
- drastic.get_ds_memory_arm9_16(address)
- drastic.get_ds_memory_arm9_32(address)
- drastic.get_ds_memory_arm7_8(address)
- drastic.get_ds_memory_arm7_16(address)
- drastic.get_ds_memory_arm7_32(address)

and it's will be cool to get the option for disabling/enabling touch screen of nds using LUA

BEST!

Re: Lua

Posted: Sat Nov 04, 2017 5:37 pm
by talos91
talos91 wrote:
kaikun97 wrote:
android.get_rotation()
Returns an integer with the current device rotation in degrees.
The range is [0,-180[ for counter-clockwise rotation and [0,180] for clockwise rotation.
However it seems to not be possible anyway since only the X rotation function in the lua code is supported at the moment.
Exophase any chance you could add Y rotation to the lua code?
Anyone has any idea how to do this?

Re: Lua

Posted: Fri Apr 27, 2018 11:08 am
by Kostas Gangstar
Tried to test the Lua script for desmume which helps with Learn with Pokemon - Typing Adventure but game will always have a white screen no matter which rom I try (normal or patched rom)..

The Retroarch desmume core and all those 1000 DS emulators in the Google store based on desmume can open the patched rom and run the game fine without a keyboard but saving won't work and Lua scripts ain't supported :/
Normal rom will give a error saying "the setup for the keyboard has failed bla bla"

Is there any way to have this game working in drastic and have the in-game saving work too? :D