Lua

Discuss anything about DraStic here.
Hemmings
Posts: 1
Joined: Thu May 25, 2017 6:38 am

Re: Lua

Postby Hemmings » Wed May 31, 2017 9:24 am

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.
User avatar
dsattorney
Posts: 74
Joined: Thu Aug 03, 2017 11:29 am
Location: Argentina

Re: Lua

Postby dsattorney » Sat Aug 05, 2017 12:22 am

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?
OBJECTION!
Image
Other places to find me:
VOGONS: http://www.vogons.org/ (as olddos25)
talos91
Posts: 70
Joined: Sat Sep 12, 2015 7:09 pm

Re: Lua

Postby talos91 » Sun Sep 03, 2017 7:48 pm

Could anyone edit the first Lua script so that it moves all four directions with the accelerometer instead of just left and right?
User avatar
dsattorney
Posts: 74
Joined: Thu Aug 03, 2017 11:29 am
Location: Argentina

Re: Lua

Postby dsattorney » Sun Sep 03, 2017 9:55 pm

Do you understand that most phones do not have a four-way accelerometer? So it's impossible to do a script for your purposes.
OBJECTION!
Image
Other places to find me:
VOGONS: http://www.vogons.org/ (as olddos25)
User avatar
kaikun97
Posts: 459
Joined: Thu Dec 26, 2013 11:41 am
Location: England

Re: Lua

Postby kaikun97 » Mon Sep 04, 2017 6:04 am

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.
User avatar
dsattorney
Posts: 74
Joined: Thu Aug 03, 2017 11:29 am
Location: Argentina

Re: Lua

Postby dsattorney » Mon Sep 04, 2017 6:59 am

Well, I guess you learn something new everyday then.
OBJECTION!
Image
Other places to find me:
VOGONS: http://www.vogons.org/ (as olddos25)
talos91
Posts: 70
Joined: Sat Sep 12, 2015 7:09 pm

Re: Lua

Postby talos91 » Tue Sep 05, 2017 2:28 am

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?

Return to “General”

Who is online

Users browsing this forum: No registered users and 3 guests