I just don't know how to mak my spites go up a slant they always go through it..
Offline
[blocks]<when green flag clicked>[/blocks]
[blocks]<forever>[/blocks]
[blocks]<if><touching color[ slant[/blocks]
[blocks]<change y by( 1[/blocks]
[blocks]<else>[/blocks]
[blocks]<if><not> <touching color[ slant >>[/blocks]
[blocks]<change y by( -1[/blocks]
[blocks]<end>[/blocks]
[blocks]<end>[/blocks]
[blocks]<end>[/blocks]
Offline
SLK wrote:
1) How do I make my sprite walk along a line (path) which I created as a Sprite2? I don't want my sprite1 to float or be able to walk in other grass areas, but only walk along a path line only.
Thanks
It sounds like what you are looking for is a Line Follower. If you type that into the Search box you will probably find a couple you can look at. Here is one that follows black lines. It probably wouldn't be hard to convert it from color sensing to sprite sensing.
http://scratch.mit.edu/projects/andrewFrmSouthAfr/51714
Oh, and by the way: Next time, please post your question as a new thread. This question really has nothing to do with going up a slant. Thanks.
Offline
How do I make the main theme song play forever UNTIL it touches the last sprite (e.g. Mario Princess) which will make the theme song STOP and play the new happy ending song?
Also, since the main theme song is short, how can I make it loop?
The order of my blocks/codes tends to prevent it from starting, or it doesnt' loop or doesn't stop.
Thanks a bunch!
Offline
<when[ (right arrow) ]key pressed>
<if><touching color[ (brown)
<point in direction (90)
<move( 10 )steps>
<else>
<repeat until><touching color[ (brown)
<set y to( -1)
<end>
<end>
this is an example of if you want a sprite to move right across a brown platform
Offline
I've tried all 3 suggestions and at times the sprite does walk on a slant, but has a tendency to drop down to the first bottomost row. I have 4 rows, connected with ladders at each end, like a Donkey Kong game, but the sprite just doesnt' stay put on a row/path, it keeps on flying down, or the codes don't work.
Any other suggestions?
Thanks a bunch!
Offline
SLK wrote:
I've tried all 3 suggestions and at times the sprite does walk on a slant, but has a tendency to drop down to the first bottomost row. I have 4 rows, connected with ladders at each end, like a Donkey Kong game, but the sprite just doesnt' stay put on a row/path, it keeps on flying down, or the codes don't work.
Any other suggestions?
Thanks a bunch!
Mine should work. Use colors like it has
Offline
SLK wrote:
Would it be possible to send you the file for you to see why the codes that I've tried to set doesn't make it walk on the line, why it gets stuck on certain axis, etc?
Thanks
Upload it
Offline
Hold on, my computer is REALLY slow
Offline
SLK wrote:
Sorry it's high quality graphics.
LLol, I don't see your sensing anywhere
Offline
The new file is called "The Hamster Saves the Day"
Ok, I've sorted the "stuck" in one spot problem.
The other 2 things are:
1) How to reset the hamster to start at the bottom left corner, even though I have set the X and Y axis starting spot, it doesn't do that. It starts from wherever it is left off.
2) How can I set the hamster to stick to path? and slant ramp? at this moment it can walk up the sky, which is not what I wanted it to do and I've tried 3 different sources codes form forum suggestions, including yours.
Big thanks
Offline
SLK wrote:
The very bottom last script for the hamster (sprite 2) actually has senses for one pathway (sprite 14), but it doesn't quite sense.
I'm adding a sensor sprite. I'll post when it's uploaded. Look for one by CFCRubiks
Offline
It needs a ton of work! (No offense)
Offline
SLK wrote:
Man... how could I do quick fixes? (my project's due tomorrow), I was so hoping I could hedge it and do quick fixes.
What else could I change and improve?
Thanks
I think I have it. You really had some weird stuff. I couldn't do my normal thing, but hey, it works! I'll upload. Keep checking the new projects for it
Offline
SLK wrote:
I'm checking yours out, it seems much better, but I think on row 2 it still has that gravitating to the bottom problem, if only I can get there without the husky dog getting the hamster first.
Thanks
Well, use the same colors for all. That's what happened. You need the same colors for each
Offline
Ok, I looked at it again.
1) I'd have to fix it so that when a game is reset, the hamster will start at the beginning bottom left corner.
2) Stop the music when he meets the princess.
You've really cleaned it up, thanks so much!
Offline
SLK wrote:
Ok, I looked at it again.
1) I'd have to fix it so that when a game is reset, the hamster will start at the beginning bottom left corner.
2) Stop the music when he meets the princess.
You've really cleaned it up, thanks so much!
No problem
Offline