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

#1 2010-02-20 11:50:04

arthurz
Scratcher
Registered: 2010-02-03
Posts: 47

new code idea

i've been making a game but when i almost finished it, i got stuck  hmm , i cant figure out how to solve this problem unless there is a code block like, if touching left edge or right edge of sprite 1 do this. Im positive that this will help scratchers.

Does any1 agree this is a good idea?


Sine wave engine, check it out.
http://www.scratch.mit.edu/projects/arthurz/2816216

Offline

 

#2 2010-02-20 11:56:02

aim4animals
Scratcher
Registered: 2010-02-20
Posts: 3

Re: new code idea

well, a good idea would be to make two sprites that run along the edges of the stage, and hide them. the collision (if touching) still works when the sprite's hidden. you just have to be somewhat creative about these things.  smile
[blocks]<forever if><turn cw(  )degrees><touching[ <when green flag clicked> [/blocks]

Offline

 

#3 2010-02-20 12:00:26

arthurz
Scratcher
Registered: 2010-02-03
Posts: 47

Re: new code idea

thanks for the idea, i might try that soon  smile


Sine wave engine, check it out.
http://www.scratch.mit.edu/projects/arthurz/2816216

Offline

 

#4 2010-02-20 16:20:02

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: new code idea

Or you could check whether the x position is more or less than 0... (more than 0 means right edge, less means left)


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

Board footer