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

#1 2009-04-20 22:12:42

matt99
Scratcher
Registered: 2009-02-15
Posts: 100+

I need help with sensors

I need help with sensors

Offline

 

#2 2009-04-20 22:20:58

joeyman
Scratcher
Registered: 2008-03-28
Posts: 1000+

Re: I need help with sensors

I can help you with that! Here's how you do it. You put in a script that says "If touching." You can find these in the "sensors" menu of Scratch.

Let's say I want to make a project where if a the Red Ball touches a Blue Ball, the blue ball disappears.

I would insert this script into the BLUE BALL:

When [flag] is clicked,
forever
if <touching [red ball]>
hide
---------------------------------------

Whenever you want to sense something, go to the sensors area of Scratch.

Last edited by joeyman (2009-04-20 22:22:00)


Joeyman: On Scratch since March 28, 2008.
Over 142 projects! (And recently a Brony, and PROUD of it!)

Offline

 

#3 2009-04-20 22:22:50

matt99
Scratcher
Registered: 2009-02-15
Posts: 100+

Re: I need help with sensors

joeyman wrote:

I can help you with that! Here's how you do it. You put in a script that says "If touching." You can find these in the "sensors" menu of Scratch.

Let's say I want to make a project where if a the Red Ball touches a Blue Ball, the blue ball disappears.

I would insert this script into the BLUE BALL:

When [flag] is clicked,
forever
if <touching [red ball]>
hide
---------------------------------------

Whenever you want to sense something, go to the sensors area of Scratch.

But..i wanna make a platformer

Offline

 

#4 2009-04-20 22:23:08

joeyman
Scratcher
Registered: 2008-03-28
Posts: 1000+

Re: I need help with sensors

[blocks]
<when green flag clicked>
<forever>
<if> <touching[ red ball
<hide>
<end>
[/blocks]

Last edited by joeyman (2009-04-20 22:24:12)


Joeyman: On Scratch since March 28, 2008.
Over 142 projects! (And recently a Brony, and PROUD of it!)

Offline

 

#5 2009-04-20 22:23:59

matt99
Scratcher
Registered: 2009-02-15
Posts: 100+

Re: I need help with sensors

joeyman wrote:

[blocks]
<when green flag clicked>
<forever>
<if><touching[red ball]>
<hide>
<end>
[/blocks]

Umm how does that help?

Offline

 

#6 2009-04-20 22:25:45

joeyman
Scratcher
Registered: 2008-03-28
Posts: 1000+

Re: I need help with sensors

Oh, you want to make a platformer, eh?
Oof...

Um... I can make platformers, but the scripts are pretty complicated! I ould download another platformer and remix it.


Joeyman: On Scratch since March 28, 2008.
Over 142 projects! (And recently a Brony, and PROUD of it!)

Offline

 

#7 2009-04-20 22:26:55

matt99
Scratcher
Registered: 2009-02-15
Posts: 100+

Re: I need help with sensors

joeyman wrote:

Oh, you want to make a platformer, eh?
Oof...

Um... I can make platformers, but the scripts are pretty complicated! I ould download another platformer and remix it.

oh,  can uuse     blocks[blocks]?

Last edited by matt99 (2009-04-20 22:27:15)

Offline

 

#8 2009-04-20 22:29:17

joeyman
Scratcher
Registered: 2008-03-28
Posts: 1000+

Re: I need help with sensors

It is REALLY complicated.... If I were you, I would download another platformer, then remix it.


Joeyman: On Scratch since March 28, 2008.
Over 142 projects! (And recently a Brony, and PROUD of it!)

Offline

 

#9 2009-04-20 22:29:59

matt99
Scratcher
Registered: 2009-02-15
Posts: 100+

Re: I need help with sensors

joeyman wrote:

It is REALLY complicated.... If I were you, I would download another platformer, then remix it.

:'-(

Offline

 

#10 2009-04-20 22:30:59

matt99
Scratcher
Registered: 2009-02-15
Posts: 100+

Re: I need help with sensors

joeyman wrote:

It is REALLY complicated.... If I were you, I would download another platformer, then remix it.

:-(

Offline

 

#11 2009-04-20 22:32:30

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: I need help with sensors

I wrote a tutorial on how  to make a scrolling platformer game.

See it @ http://archblogger.wordpress.com/2008/11/06/make-a-game-like-super-mario-world-demo/

Its not really that hard.

Last edited by archmage (2009-04-20 22:33:15)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#12 2009-04-20 22:39:52

joeyman
Scratcher
Registered: 2008-03-28
Posts: 1000+

Re: I need help with sensors

Yeah, it isn't hard to make, but it's hard to explain.


Joeyman: On Scratch since March 28, 2008.
Over 142 projects! (And recently a Brony, and PROUD of it!)

Offline

 

#13 2009-04-21 19:40:58

matt99
Scratcher
Registered: 2009-02-15
Posts: 100+

Re: I need help with sensors

...uhh...im kinda a newbie so maybe its too hard?

Offline

 

#14 2009-04-21 20:12:16

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: I need help with sensors

Try downloading and following the example code from the blog post.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#15 2009-04-21 20:13:02

matt99
Scratcher
Registered: 2009-02-15
Posts: 100+

Re: I need help with sensors

archmage wrote:

Try downloading and following the example code from the blog post.

blog?

Offline

 

#16 2009-04-22 11:34:48

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: I need help with sensors

not hard at all to make.

assuming you have a variable called gravity:
basic concept:
if its touching the ground, gravity is 0 and its y is changed by one
else change gravity by a negative number
then simply change y by gravity and add your key codes

Offline

 

#17 2009-04-22 13:13:00

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: I need help with sensors

matt99 wrote:

archmage wrote:

Try downloading and following the example code from the blog post.

blog?

right here
http://archblogger.wordpress.com/2008/11/06/make-a-game-like-super-mario-world-demo/


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#18 2009-04-23 02:32:26

Leesha300
Scratcher
Registered: 2009-04-22
Posts: 3

Re: I need help with sensors

i cant get looks into scrpit please help me!!

Offline

 

#19 2009-04-23 02:34:14

Leesha300
Scratcher
Registered: 2009-04-22
Posts: 3

Re: I need help with sensors

sad  I Need Help I Cant Get My Looks Into My Scripts Please Tell Me How!!!

Offline

 

#20 2009-04-23 02:35:18

Leesha300
Scratcher
Registered: 2009-04-22
Posts: 3

Re: I need help with sensors

sad  sad  sad  sad  sad  sad  sad

Offline

 

#21 2009-04-23 04:25:07

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: I need help with sensors

Leesha300 wrote:

sad  I Need Help I Cant Get My Looks Into My Scripts Please Tell Me How!!!

I'd like to help...but I don't know what you are asking.  Do you mean you want to load a picture into a Scratch project?  If that is what you are asking, you can usually just drag the picture using your mouse and drop it onto an open Scratch project when you see the little plus sign appear.  I hope that helps.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer