Yes, I know what it does. That's fairly obvious.
Is there a way to reconstruct that block by using other blocks, except using sprite or color sensing? So in other words, it'd be like "if touching color [ ], bounce".
I've tried it but Scratch has a weird angle system xP
Offline
laptop97 wrote:
Not that I know of. You could maybe make one with touching [edge] block though.
I don't want it to bounce if it's touching the edge though
I want it to bounce if it's touching a certain color
Offline
cpumaster930 wrote:
laptop97 wrote:
Not that I know of. You could maybe make one with touching [edge] block though.
I don't want it to bounce if it's touching the edge though
I want it to bounce if it's touching a certain color
Wow I didn't think that through.
If <Touching [Color]>
//Some really hard script most likely using the point in direction () block \\
Wait until <Not<Touching [Color]> >
{End of If}
Maybe that would work?
Offline
laptop97 wrote:
cpumaster930 wrote:
laptop97 wrote:
Not that I know of. You could maybe make one with touching [edge] block though.
I don't want it to bounce if it's touching the edge though
I want it to bounce if it's touching a certain colorWow I didn't think that through.
If <Touching [Color]>
//Some really hard script most likely using the point in direction () block \\
Wait until <Not<Touching [Color]> >
{End of If}
Maybe that would work?
Yes, I have that already.
I just don't know what direction to make it point in--I've tried direction + 180, direction x -1, 180 - direction, and 360 - direction, and none of those have worked.
Offline
This script isn't the best but;
Start
Forever If <Touching [Color]>
Point in Direction ((Direction ) + (180))
Move (//Number of steps sprite moves\\) steps
{End of Forever If}
Last edited by laptop97 (2011-09-25 16:20:11)
Offline
okay so I figured out this:
where the side walls are black and the top/bottom walls are light gray.
Is there any way to get this to work with one color?
(Don't ask what the move 0 steps blocks are there for, I have no idea )
Last edited by cpumaster930 (2011-09-25 16:28:29)
Offline
This should be fairly easy to figure out: just sit down with a piece of paper and do some maths
Offline
cpumaster930 wrote:
okay so I figured out this:
http://i.imgur.com/JMSSi.gif
where the side walls are black and the top/bottom walls are light gray.
Is there any way to get this to work with one color?
(Don't ask what the move 0 steps blocks are there for, I have no idea )
Give me a second to improve this one; this seems correct, and you can judge whether you've hit a wall or ceiling by its direction and some unrendered checks.
EDIT: Got it:
Last edited by Kileymeister (2011-09-25 16:39:58)
Offline
cpumaster930 wrote:
okay so I figured out this:
http://i.imgur.com/JMSSi.gif
where the side walls are black and the top/bottom walls are light gray.
Is there any way to get this to work with one color?
(Don't ask what the move 0 steps blocks are there for, I have no idea )
Sensing seems like the easiest solution for this.
Offline
I just noticed that it's impossible to use plain arithmetic to figure out the angles. Maybe some trig?
Offline
Kileymeister wrote:
cpumaster930 wrote:
okay so I figured out this:
where the side walls are black and the top/bottom walls are light gray.
Is there any way to get this to work with one color?
(Don't ask what the move 0 steps blocks are there for, I have no idea )Give me a second to improve this one; this seems correct, and you can judge whether you've hit a wall or ceiling by its direction and some unrendered checks.
EDIT: Got it:
YESSSSSSSSSSSSSSSSSSSSS
You, sir, are a genius. Thank you muchly
Now I can proceed with my game ^^
Offline
cpumaster930 wrote:
YESSSSSSSSSSSSSSSSSSSSS
You, sir, are a genius. Thank you muchly
Now I can proceed with my game ^^
Happy to help. I hope I get to see your finished masterpiece.
Last edited by Kileymeister (2011-09-25 16:46:52)
Offline
I know Kileymeister already figured it out, but would this work?
For your moving scripts (if there are any) add point in direction 90 for right arrow and -90 for left. Then say if touching color and direction = 90 point in direction - 90 and do the same thing but switch the direction = to direction = -90 and point in direction 90.
Offline