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

#1 2011-07-27 13:53:08

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Question about Sensors

I just have a question about sensoring sprites. Like you know how Scratch wiki and alot of people say make a first costume with red green, etc? Well, I just wanted to ask does the sensoring script still work if the costume is not the sensor costume?


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#2 2011-07-27 13:56:11

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Question about Sensors

I'm a little confused - I've always used an entirely different sprite as the sensor. If you mean switching back and forth between the sensor and the player sprite, I imagine it would still work as long as you adjusted the scripts to account for the change in costume placement.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#3 2011-07-27 13:57:33

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Question about Sensors

Are you talking about Wall Jumping? You could change the colors...

Offline

 

#4 2011-07-28 00:26:59

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: Question about Sensors

scimonster wrote:

Are you talking about Wall Jumping? You could change the colors...

Scimonster no I mean like some people make a costume of a sprite with like blue on top yellow on the left red on right green on bottom. Then they make another costume of the player sprite. And the sensoring stuff still work. So that is my question will that work if I try it?


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#5 2011-07-28 00:29:17

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Question about Sensors

Thescratch3 wrote:

scimonster wrote:

Are you talking about Wall Jumping? You could change the colors...

Scimonster no I mean like some people make a costume of a sprite with like blue on top yellow on the left red on right green on bottom. Then they make another costume of the player sprite. And the sensoring stuff still work. So that is my question will that work if I try it?

That kind of sensing needs a LOT of well coordinated scripts... and doesn't work well offline except in presentation mode...

I prefer to use the

Code:

move 1 step

if touching <>

move -1 step

mode  wink


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#6 2011-07-28 00:33:04

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Question about Sensors

Thescratch3 wrote:

scimonster wrote:

Are you talking about Wall Jumping? You could change the colors...

Scimonster no I mean like some people make a costume of a sprite with like blue on top yellow on the left red on right green on bottom. Then they make another costume of the player sprite. And the sensoring stuff still work. So that is my question will that work if I try it?

Ah, that. You're much better off making the sensor and the visible costume two entirely different sprites - it makes things much simpler.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#7 2011-07-28 00:34:08

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Question about Sensors

Harakou wrote:

Thescratch3 wrote:

scimonster wrote:

Are you talking about Wall Jumping? You could change the colors...

Scimonster no I mean like some people make a costume of a sprite with like blue on top yellow on the left red on right green on bottom. Then they make another costume of the player sprite. And the sensoring stuff still work. So that is my question will that work if I try it?

Ah, that. You're much better off making the sensor and the visible costume two entirely different sprites - it makes things much simpler.

What Harakou said also works... but I like my way better  tongue


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#8 2011-07-28 00:37:09

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Question about Sensors

jji7skyline wrote:

Harakou wrote:

Thescratch3 wrote:


Scimonster no I mean like some people make a costume of a sprite with like blue on top yellow on the left red on right green on bottom. Then they make another costume of the player sprite. And the sensoring stuff still work. So that is my question will that work if I try it?

Ah, that. You're much better off making the sensor and the visible costume two entirely different sprites - it makes things much simpler.

What Harakou said also works... but I like my way better  tongue

That really only helps with the simplest of games though. It's hardly suitable for a platformer.  hmm


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#9 2011-07-28 00:39:27

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Question about Sensors

Harakou wrote:

jji7skyline wrote:

Harakou wrote:


Ah, that. You're much better off making the sensor and the visible costume two entirely different sprites - it makes things much simpler.

What Harakou said also works... but I like my way better  tongue

That really only helps with the simplest of games though. It's hardly suitable for a platformer.  hmm

I used it on mine...  hmm

Of course platformers are not my speciality  big_smile


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#10 2011-07-28 00:46:02

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Question about Sensors

jji7skyline wrote:

Harakou wrote:

jji7skyline wrote:

What Harakou said also works... but I like my way better  tongue

That really only helps with the simplest of games though. It's hardly suitable for a platformer.  hmm

I used it on mine...  hmm

Of course platformers are not my speciality  big_smile

http://s3.amazonaws.com/kym-assets/entries/icons/original/000/006/151/tumblr_lltzgnHi5F1qzib3wo1_400.jpg?1308698386

I'm actually surprised how well that works, given the simplicity of the algorithm. Of course, it results in a jittery look when on the ground, but that's pretty easy to ignore given you spend half the time in the air anyway.  tongue

Last edited by Harakou (2011-07-28 00:46:10)


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#11 2011-07-28 00:53:40

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Question about Sensors

Harakou wrote:

jji7skyline wrote:

Harakou wrote:


That really only helps with the simplest of games though. It's hardly suitable for a platformer.  hmm

I used it on mine...  hmm

Of course platformers are not my speciality  big_smile

http://s3.amazonaws.com/kym-assets/entr … 1308698386

I'm actually surprised how well that works, given the simplicity of the algorithm. Of course, it results in a jittery look when on the ground, but that's pretty easy to ignore given you spend half the time in the air anyway.  tongue

Thanks!  big_smile


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#12 2011-07-28 00:54:45

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: Question about Sensors

Harakou wrote:

Thescratch3 wrote:

scimonster wrote:

Are you talking about Wall Jumping? You could change the colors...

Scimonster no I mean like some people make a costume of a sprite with like blue on top yellow on the left red on right green on bottom. Then they make another costume of the player sprite. And the sensoring stuff still work. So that is my question will that work if I try it?

Ah, that. You're much better off making the sensor and the visible costume two entirely different sprites - it makes things much simpler.

Oh like setting the ghost effect on hit tests sprites to 100 and detect? But do you know how to do it as my question asked? (Although your idea is good too!)


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#13 2011-07-28 00:56:36

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Question about Sensors

Thescratch3 wrote:

Harakou wrote:

Thescratch3 wrote:


Scimonster no I mean like some people make a costume of a sprite with like blue on top yellow on the left red on right green on bottom. Then they make another costume of the player sprite. And the sensoring stuff still work. So that is my question will that work if I try it?

Ah, that. You're much better off making the sensor and the visible costume two entirely different sprites - it makes things much simpler.

Oh like setting the ghost effect on hit tests sprites to 100 and detect? But do you know how to do it as my question asked? (Although your idea is good too!)

Yup, that's what I meant. As for your original question, I'm not really sure, since I've never really tried something like that before and I don't know how it works in practice.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#14 2011-07-28 00:56:44

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Question about Sensors

Thescratch3 wrote:

Harakou wrote:

Thescratch3 wrote:


Scimonster no I mean like some people make a costume of a sprite with like blue on top yellow on the left red on right green on bottom. Then they make another costume of the player sprite. And the sensoring stuff still work. So that is my question will that work if I try it?

Ah, that. You're much better off making the sensor and the visible costume two entirely different sprites - it makes things much simpler.

Oh like setting the ghost effect on hit tests sprites to 100 and detect? But do you know how to do it as my question asked? (Although your idea is good too!)

There is a tutorial about that somewhere... look around for it... or check on the Scratch Wiki.


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#15 2011-07-28 00:58:22

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: Question about Sensors

Harakou wrote:

Thescratch3 wrote:

Harakou wrote:


Ah, that. You're much better off making the sensor and the visible costume two entirely different sprites - it makes things much simpler.

Oh like setting the ghost effect on hit tests sprites to 100 and detect? But do you know how to do it as my question asked? (Although your idea is good too!)

Yup, that's what I meant. As for your original question, I'm not really sure, since I've never really tried something like that before and I don't know how it works in practice.

Wait Harakou is your idea like the one in the Scratch Wiki?


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#16 2011-07-28 01:00:53

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Question about Sensors

Thescratch3 wrote:

Harakou wrote:

Thescratch3 wrote:


Oh like setting the ghost effect on hit tests sprites to 100 and detect? But do you know how to do it as my question asked? (Although your idea is good too!)

Yup, that's what I meant. As for your original question, I'm not really sure, since I've never really tried something like that before and I don't know how it works in practice.

Wait Harakou is your idea like the one in the Scratch Wiki?

This is something like Harakou's idea: http://wiki.scratch.mit.edu/wiki/Scroll … r_Tutorial


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#17 2011-07-28 01:06:31

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Question about Sensors

jji7skyline wrote:

Thescratch3 wrote:

Harakou wrote:


Yup, that's what I meant. As for your original question, I'm not really sure, since I've never really tried something like that before and I don't know how it works in practice.

Wait Harakou is your idea like the one in the Scratch Wiki?

This is something like Harakou's idea: http://wiki.scratch.mit.edu/wiki/Scroll … r_Tutorial

Yep, that's the pretty standard method for making a platformer in Scratch.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#18 2011-07-28 02:17:28

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: Question about Sensors

Harakou wrote:

jji7skyline wrote:

Thescratch3 wrote:


Wait Harakou is your idea like the one in the Scratch Wiki?

This is something like Harakou's idea: http://wiki.scratch.mit.edu/wiki/Scroll … r_Tutorial

Yep, that's the pretty standard method for making a platformer in Scratch.

Oh okay. I shall try it out in my new Super Mario Galaxy game!


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#19 2011-07-28 02:19:15

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: Question about Sensors

jji7skyline wrote:

Thescratch3 wrote:

Harakou wrote:


Yup, that's what I meant. As for your original question, I'm not really sure, since I've never really tried something like that before and I don't know how it works in practice.

Wait Harakou is your idea like the one in the Scratch Wiki?

This is something like Harakou's idea: http://wiki.scratch.mit.edu/wiki/Scroll … r_Tutorial

JJ, can you explain how you did your black sprite with colors on different side censoring?


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#20 2011-07-28 03:05:51

jji7skyline
Scratcher
Registered: 2010-03-08
Posts: 1000+

Re: Question about Sensors

Thescratch3 wrote:

jji7skyline wrote:

Thescratch3 wrote:


Wait Harakou is your idea like the one in the Scratch Wiki?

This is something like Harakou's idea: http://wiki.scratch.mit.edu/wiki/Scroll … r_Tutorial

JJ, can you explain how you did your black sprite with colors on different side censoring?

I didn't use that I think...  hmm  Ask Harakou, or olivora  smile


I don't know why you say goodbye, I say hello!  big_smile

Offline

 

#21 2011-07-28 03:07:50

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: Question about Sensors

jji7skyline wrote:

Thescratch3 wrote:

jji7skyline wrote:


This is something like Harakou's idea: http://wiki.scratch.mit.edu/wiki/Scroll … r_Tutorial

JJ, can you explain how you did your black sprite with colors on different side censoring?

I didn't use that I think...  hmm  Ask Harakou, or olivora  smile

I thought you used that with your plat former  hmm . Okay I will do that tomorrow.


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

Board footer