Your "stage" sprite lacks a script for changing when the character touches the edge, a solution would be a variable, which you already have "x" and "y".
when gf clicked//stage sprite forever if <<(X) = (0)> and <(Y) = (0)>> switch to costume [costume 1 v] end if <<(X) = (1)> and <(Y) = (0)>> switch to costume [costume 2 v] end when gf clicked//for the character forever if <touching [edge v]?> if <(x position) < (-230)> change [X v] by (1) set x to (230) end if <(x position) > (230)> change [X v] by (-1) set x to (-230) endand so forth for all edges, it's a limited script but it should work
Last edited by zammer990 (2012-09-04 14:11:51)
Offline
On the player
when gf clicked set [y v] to [1] set [real y v] to [1] forever if <touching [up detect v]?> change [y v] by (1) set y to (somewhere) end if <touching [down detect v]?> change [y v] by (-1) set y to (somewhere) end if <(length of (y)) < [2]> set [real y v] to (join [0] (y)) else set [real y v] to (y) end set [etc v] to [etc] endThe etc means something almost identical for x.
when gf clicked forever switch to background (join (realx) (real y)) end. This supports up to 99*99 backgrounds.
Offline