So yeah, towards a specific point on the screen in a specific amount of time without using the glide block?
Oh, and without using any movement blocks except for the change x and y position...
Offline
Sure. Gimme a second.
Offline
when gf clicked go to x:(0) y:(0) set [ox v] to (x position) set [oy v] to (y position) set [x v] to [100] set [y v] to [50] set [time v] to [2] repeat ((time)*(100)) change x by (((x)-(ox))/((time)*(100))) change y by (((y)-(oy))/((time)*(100))) wait (((1)/(100))-(calibration)) secs // calibration is a very small number to adjust for delays in the repeat block end
Last edited by Hardmath123 (2012-07-19 06:41:52)
Offline
Thank you!
You never actually declared calibration though... what should it be?
Offline
LS97 wrote:
Thank you!
You never actually declared calibration though... what should it be?
Well... I didn't tinker enough, but it should be really, really small, like 0.0005-ish. It's to counter-balance the delay induced by repeat until and wait. Hold on, I'll quickly write a program to find it out for me.
Offline
0.03 works fine.
But change all instances of 100 to 10 or 25, otherwise you'll be waiting negative time...
Offline
Hardmath123 wrote:
0.03 works fine.
But change all instances of 100 to 10 or 25, otherwise you'll be waiting negative time...
![]()
OK, thank you very much!
Offline
You're welcome.
Offline
when gf clicked set [goal x v] to [100] set [goal y v] to [100] set [time v] to [3] set [start v] to (timer) set [start x v] to (x position) set [start y v] to (y position) repeat until <((timer)-(start)) > (time)> change x by (((((goal x)-(start x))*(((timer)-(start))/(time)))+(start x))-(x position)) change y by (((((goal y)-(start y))*(((timer)-(start))/(time)))+(start y))-(y position)) end change x by ((goal x)-(x position)) change y by ((goal y)-(y position))...why no goto block? 0.o
Offline