awesome! this works great! Now, I will note that one of the reasons I am trying to do this myself rather than using the physics Engine is because I need as low CPU usage as possible to run on mobile. So, If anyone else wants to use this method like me, here is my set up:
| Local number nx = 0
| Local number ny = 0
| Local number vn = 0
* On function 'bounceOff'
* Parameter 'ballID' (Number)
* Parameter 'angleOfWall' (Number)
-> System: Set nx to cos(angleOfWall - 90)
-> System: Set ny to sin(angleOfWall-90)
----+ Ball: Pick instance with UID ballID
-----> System: Set vn to Ball.VelX × nx + Ball.VelY × ny
-----> DebugText: Set text to "vn: " & (round(vn × 1000))÷1000 & " nx: " & (round(nx×1000)÷1000) & " ny: " & (round(ny×1000))÷1000
-----> Ball: Set VelX to Ball.VelX -2×vn×nx
-----> Ball: Set VelY to Ball.Vely -2×vn×ny
This is a function I created that I can use to bounce the ball off any angled platform. It works great. Thanks R0J0hound. Now, because I am trying to go for as low CPU usage as humanly possible, I found that you can use that function and that debug text to get the exact values for nx and ny for any slant. Every angle has its own, and they only change if the angle of the slant does. So, If you find those values, you can set up bounces like this:
+ System: Every tick
+ System: For each Ball
-> Ball: Set VelY to Self.VelY + worldGravity
-> System: Set newx to Ball.X + Ball.VelX
-> System: Set newy to Ball.Y + Ball.Vely
----+ System: newy > 1038 + (0.464×(newx))
----+ System: newx < 360
-----> System: Set nx to 0.423
-----> System: Set ny to -0.906
-----> System: Set vn to Ball.VelX × nx + Ball.VelY × ny
-----> Ball: Set VelX to Ball.VelX -2×vn×nx
-----> Ball: Set VelY to Ball.Vely -2×vn×ny
-----> System: Set newx to Ball.X + Ball.VelX
-----> System: Set newy to Ball.Y + Ball.Vely
-----> Ball: Set position to (newx, newy)
----+ System: Else
----+ System: newy > 1372 - (0.464 × newx)
----+ System: newx > 360
-----> System: Set nx to -0.423
-----> System: Set ny to -0.906
-----> System: Set vn to Ball.VelX × nx + Ball.VelY × ny
-----> Ball: Set VelX to Ball.VelX -2×vn×nx
-----> Ball: Set VelY to Ball.Vely -2×vn×ny
-----> System: Set newx to Ball.X + Ball.VelX
-----> System: Set newy to Ball.Y + Ball.Vely
-----> Ball: Set position to (newx, newy)
----+ System: Else
----+ System: newx < 29
-----> Ball: Set VelX to -Ball.velX
-----> System: Set newx to Ball.X + Ball.VelX
-----> System: Set newy to Ball.Y + Ball.Vely
-----> Ball: Set position to (newx, newy)
----+ System: Else
----+ System: newx > 691
-----> Ball: Set VelX to -Ball.velX
-----> System: Set newx to Ball.X + Ball.VelX
-----> System: Set newy to Ball.Y + Ball.Vely
-----> Ball: Set position to (newx, newy)
----+ System: Else
-----> Ball: Set position to (newx, newy)
That way, the computer doesn't need to calculate ny and nx for slants that you know will be common. You can just find them beforehand and plug them in. That condition is the formula for a slanted platform near the bottom of the game layout. It works great.
That is essentially the entirety of the mini physics engine I just built. Works great.