I was working on a pong game, and the script I have works about the first 20 times it falls, then I have to manually click the green flag (although I have something broadcasting the green flag)
The first script:
when gf clicked go to x: (0) y: (0) set [xv v] to [0] set [yv v] to [0] forever change [yv v] by (-0.3) set [xv v] to ((xv) * (0.99)) change x by (xv) if <touching [edge v]?> set [xv v] to ((-0.5) * (xv)) if <(x position) > [0]> set x to (230) else set x to (-231) end end change y by (yv) if <(y position) < [-129]> set [ystoragevar v] to (y position) set y to (-128) if <touching [Paddle v]?> point towards [Paddle v] turn ccw (180) degrees change [xv v] by ((8) * ( [sin v] of (direction))) set [yv v] to ((8) * ( [cos v] of (direction))) else set y to (ystoragevar) end end if <touching [edge v]?> broadcast [meh v] stop script end endAnd the second script (attempting the green flag workaround):
when I receive [meh v] broadcast [scratch-startclicked v] wait (0.3) secsCan anyone help?
Offline
I know, it was just for testing. Got any idea whats wrong?
Offline
what are you actually trying to do
Offline
Make a pong game with gravity...
Offline
no not that just with this one script
what are you trying
Offline
jamiewinter wrote:
no not that just with this one script
what are you trying
The physics... It's kinda obvious if you actually look at the script...
Offline
Oops sorry for snapping . It's been a long day.
Offline
Hmm, it works in the flash player but not downloaded...
Offline