If the walls are on the edge, you could do
if on edge, bounceOtherwise, you could do:
forever if <touching color [#000000]?>//The color of the walls point in direction ((180)-(direction)) move (1) steps//i don't think this part is needed, but I would use it.
Last edited by awesomeness321 (2012-10-28 09:58:45)
Offline
You can do this,
if on edge, bounceIf its a ground/wall do this,
forever if <<color is touching color>>//1,the side of the player color2, the ground/wall color// move (-10) steps// to get the player away from the ground/wall [/scratchblocks
Last edited by Nekrobat (2012-10-29 10:16:42)
Offline
chrisbown wrote:
it's an auto scrolling platforming game that gets faster as you go on that this needs help with.
If the walls are all parallel or perpendicular to the x axis, you can just reverse the x and y velocity (depending on whether you hit a "wall" or a "ceiling".
when gf clicked forever figure out changes to x and y velocity change x by (xvel) if<touching [wall v]?> set [xvel v] to ((-1)*(xvel)) change x by (xvel) end change y by (yvel) if<touching [wall v]?> set [yvel v] to ((-1)*(yvel)) change y by (yvel) end
Offline