make a border so that my little guy is like, in a little pen or something. So I'm basically saying is, "How do you prevent a character from going to a certain part of the stage?"
Offline
You could try something like
if (x position) > (right edge of pen) ||set x to (right edge of pen) |______________________| if (x position) < (left edge of pen) ||set x to (left edge of pen) |______________________|
You can change the "x" blocks to their "y" equivalents to do the same for up and down. It looks a little messy in editing mode, but if you put the project in presentation mode, it works
Offline
Wolfie1996 wrote:
You could try something like
Code:
if (x position) > (right edge of pen) ||set x to (right edge of pen) |______________________| if (x position) < (left edge of pen) ||set x to (left edge of pen) |______________________|You can change the "x" blocks to their "y" equivalents to do the same for up and down. It looks a little messy in editing mode, but if you put the project in presentation mode, it works
![]()
Okay, Thanks Wolfie. I'll try it. The character follows the mouse, though.
Will this work with the mouse?
Offline
Hi! Me and Gar are collabing on this project. AW MAN, I GOTTA WAIT 12 MINUTES!?
Well I guess we can watch a MLAATR while we wait.
Offline
Paddle2See made a Sprite go around objects: http://scratch.mit.edu/projects/Paddle2SeeFixIt/186501 It might be what you need for your AI following.
Offline