This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-04-20 06:57:41

GarSkutherGirl
Scratcher
Registered: 2009-04-27
Posts: 1000+

I don't know how to....

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?"


Oh, the glory of it all - adorable cat people dressed as video game characters!
http://fc05.deviantart.net/fs71/f/2011/311/8/b/look_in_the_description_for_the_actual_epicness__by_garskuthergirl-d4fggrw.pnghttp://fc02.deviantart.net/fs70/f/2011/311/d/c/ahahahaha______by_garskuthergirl-d4fgc04.png

Offline

 

#2 2011-04-20 09:18:48

MikeJohn
New Scratcher
Registered: 2011-04-19
Posts: 3

Re: I don't know how to....

I have little experience in HTML and Php developing field.

Offline

 

#3 2011-04-20 09:44:21

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: I don't know how to....

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  smile


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

#4 2011-04-20 10:01:46

GarSkutherGirl
Scratcher
Registered: 2009-04-27
Posts: 1000+

Re: I don't know how to....

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  smile

Okay, Thanks Wolfie. I'll try it. The character follows the mouse, though.
Will this work with the mouse?


Oh, the glory of it all - adorable cat people dressed as video game characters!
http://fc05.deviantart.net/fs71/f/2011/311/8/b/look_in_the_description_for_the_actual_epicness__by_garskuthergirl-d4fggrw.pnghttp://fc02.deviantart.net/fs70/f/2011/311/d/c/ahahahaha______by_garskuthergirl-d4fgc04.png

Offline

 

#5 2011-04-20 10:16:23

TinyTorchic22
Scratcher
Registered: 2010-07-14
Posts: 100

Re: I don't know how to....

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.  hmm


http://tf2chan.net/resources/src/130891976684.jpghttp://s3.amazonaws.com/kym-assets/photos/images/original/000/081/335/Concord_dinkleberg.jpg?1289026294

Offline

 

#6 2011-04-20 12:56:36

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: I don't know how to....

Paddle2See made a Sprite go around objects: http://scratch.mit.edu/projects/Paddle2SeeFixIt/186501 It might be what you need for your AI following.  smile

Offline

 

Board footer