I cant progress with my game until my ship bounces of the white or blue walls somehow... please see my project because my ship moves differently (point to direction [-1 x direction] doesnt work u see). My project underneath:
http://scratch.mit.edu/projects/Subsidel/2702952
Cheers
Offline
The easiest way I've found (using x and y velocities) is below. Though you use direction to change these values, the technique should still work (it would be easier in my - uncommon - opinion if all your walls were the same color, which is how I've written my script)
when gf clicked forever calculate velocities change x by (x-vel) if<touching [wall v]?> set [x-vel v] to ((-1)*(x-vel)) change x by (x-vel) end change y by (y-vel) if<touching [wall v]?> set [y-vel v] to ((-1)*(y-vel)) change x by (y-vel) end
Offline
So i guess i need to change my bomb bounce to using x and y velocities as its currently using colour to detect the walls which are positioned on the x axis/ y axis. Thnx v much. Daniel would rly appreciate your help too
Offline