I have a script
when green flag clicked set [scrollX v] to [0] set [scrollY v] to [0] set [turningVel v] to [0] set [velocity v] to [0] forever go to front if <key [left arrow v] pressed?> change [turningVel v] by (-1) end if <key [right arrow v] pressed?> change [turningVel v] by (1) end if <key [up arrow v] pressed?> change [velocity v] by (1) end if <<key [down arrow v] pressed?> and <[0] < (velocity)>> change [velocity v] by (-1) end if <[0] > (velocity)> set [velocity v] to [0] end set [turningVel v] to ((turningVel) * (0.98)) set [velocity v] to ((velocity) * (0.98))Is there a way to incorporate the scrolling with the move steps block? Can someone give me a script for it?
Last edited by Firedrake969 (2012-12-02 11:03:39)
Offline
Firedrake969 wrote:
when green flag clicked set [scrollX v] to [0] set [scrollY v] to [0] set [turningVel v] to [0] set [velocity v] to [0] forever go to front if <key [left arrow v] pressed?> change [turningVel v] by (-1) end if <key [right arrow v] pressed?> change [turningVel v] by (1) end if <key [up arrow v] pressed?> change [velocity v] by (1) end if <<key [down arrow v] pressed?> and <[0] < (velocity)>> change [velocity v] by (-1) end if <[0] > (velocity)> set [velocity v] to [0] end set [turningVel v] to ((turningVel) * (0.98)) set [velocity v] to ((velocity) * (0.98))
Offline
Just to make sure, do you have ScrollX and ScrollY?
Last edited by ErnieParke (2012-12-03 19:56:42)
Offline
ErnieParke wrote:
Just to make sure, do have ScrollX and ScrollY?
Yes.
Offline
Firedrake969 wrote:
ErnieParke wrote:
Just to make sure, do have ScrollX and ScrollY?
Yes.
And when do you need this script by?
Offline
ErnieParke wrote:
Firedrake969 wrote:
ErnieParke wrote:
Just to make sure, do have ScrollX and ScrollY?
Yes.
And when do you need this script by?
Anytime.
Offline
I'm not sure if you can incorporate it with the move steps block. But you can do something else:
when gf clicked set [direction v] to [0] forever change [direction v] by (turningVel) change [scrollX v] by ((([sin v] of ((direction)*(1)))*(velocity))*(-1)) change [scrollY v] by ((([cos v] of ((direction)*(1)))*(velocity))*(-1))If you don't find that helpful you could look at these projects: here and here.
Last edited by 30-1 (2012-12-06 08:12:24)
Offline