I need help with this agility game I'm making.. http://scratch.mit.edu/projects/rolfwolf/1363880
Please help me! Okay, so.. Here's what I want: You know how the dog follows the handler? Well, I want it so if the dog touches the white on the jump, it goes over the jump (walks over it at around 2 steps), even if the hander goes away from the jump. But, I want it if it touches the black, then it won't go over the jump, and the dog will just stop. Also, it doesn't HAVE to be like this but I would like it if the dog went over the jump at the same angle it was going when it touched the white. Oh, and after the dog jumps over the jump, I want it to come back to the handler and be back to normal (like it is now). I will give you HUGE credit if you help me! I might be able to make the black stuff. (I mean when it touches the black, it stops.) Please help if you can. It will be GREATLY appreciated. Thanks in advance.
Sorry I'm asking so much... DX
To help:
1st: Download the game
2nd: Make the scripts that fufil my needy needs. XD (Sorry.)
3rd: Share it.
4th: Give me a link!
OR you can just tell me the scripts.
Done so far:
The dog stops when it touches the black (Cherrypaw101) [Though I didn't want the whole project to stop, I think I can fix it.]
The dog goes to it's starting point when it touches the black. (benjamin2) [Though I wanted it to just stop for a while and then the dog comes back to the handler, thanks!!]
NOTE: You can still script these things if you think you could make it better. (Ex: Cherrypaw101 made the whole project stop when the dog touches the black, and you think you could make it better. Like only the dog stopping.)
Thanks, guys!
Last edited by rolfwolf (2010-10-23 14:40:32)
Offline
i did it!
Offline
To make the dog stop use this
IF[touching color "black"]
forever
move -2 steps OR if you want the dog to be able to move after it touches black use this:
repeat until [not"touching(black)"]
move -2 steps.
Offline
Update on my progress: So far I admit that I have stripped the dog sprite of most the codes that you gave it. They were conflicting with my style of scripting.
I'm putting in some more coding for the dog for basic movement. I've almost tackled the jump and the dog stays close to the owner most of the time with a few glitches.
The dog will continue in the direction that it hit the jump at while the handler can go in a different direction. I've had a few glitches with leaving the jump but I think I know how to solve them.
Sorry if the scratch blocks look weird it's my first time using them in a post.
Common glitches:
1) Dog freezes when it touches the pink after a jump. Solving idea before I forget: [blocks]<when green flag clicked> <forever> <if> << <touching[ jump1 <and> << <color[ brown ]is over[ pink <or> <( <distance to[ <>> 50 )> >> >><move( 2 )steps> <else> <move( 1 )steps> [/blocks]
Distance is uncertain and left for fine tuning...
I've haven't tried this script out yet.
*EDIT*
Or I could just remove the conflicting script that is the opposite of what I want...
Last edited by KatJoy (2010-10-22 04:46:00)
Offline
I can't help in full (I can't undrestand what you're saying) , but you know you said you want the dog to stop but not the whole project if it touches the black? Well, do this.
Make a variable called Stopx and Stopy.
Put these two scripts on the dog.
<when green flag clicked>
<set{ Stopx }to( no number actually put in the words no number
<set{ Stopy }to( no number
<wait until><color[ the color of the dog ]is over[ black
<set{ Stopx }to( -the x position of the dog-
<set{ Stopy }to( -the y position of the dog-
<broadcast[ stop dog
<when I receive[ stop dog
<forever>
<go to x <{ stopx }> )y
<{ stopy }>
Hope this helps!
Offline
KatJoy wrote:
Update on my progress: So far I admit that I have stripped the dog sprite of most the codes that you gave it. They were conflicting with my style of scripting.
I'm putting in some more coding for the dog for basic movement. I've almost tackled the jump and the dog stays close to the owner most of the time with a few glitches.
The dog will continue in the direction that it hit the jump at while the handler can go in a different direction. I've had a few glitches with leaving the jump but I think I know how to solve them.
Sorry if the scratch blocks look weird it's my first time using them in a post.
Common glitches:
1) Dog freezes when it touches the pink after a jump. Solving idea before I forget: [blocks]<when green flag clicked> <forever> <if> << <touching[ jump1 <and> << <color[ brown ]is over[ pink <or> <( <distance to[ <>> 50 )> >> >><move( 2 )steps> <else> <move( 1 )steps> [/blocks]
Distance is uncertain and left for fine tuning...
I've haven't tried this script out yet.
*EDIT*
Or I could just remove the conflicting script that is the opposite of what I want...
Thanks KatJoy! You're the best! You're super smart at scripting. XD
Offline
benjamin2 wrote:
I can't help in full (I can't undrestand what you're saying) , but you know you said you want the dog to stop but not the whole project if it touches the black? Well, do this.
Make a variable called Stopx and Stopy.
Put these two scripts on the dog.
<when green flag clicked>
<set{ Stopx }to( no number actually put in the words no number
<set{ Stopy }to( no number
<wait until><color[ the color of the dog ]is over[ black
<set{ Stopx }to( -the x position of the dog-
<set{ Stopy }to( -the y position of the dog-
<broadcast[ stop dog
<when I receive[ stop dog
<forever>
<go to x<{ stopx }> )y
<{ stopy }>
Hope this helps!![]()
Thank you!! I'll try it! Sorry you didn't understand, I'm not good at explaining stuff. DX
Offline
Tickles wrote:
To make the dog stop use this
IF[touching color "black"]
forever
move -2 steps OR if you want the dog to be able to move after it touches black use this:
repeat until [not"touching(black)"]
move -2 steps.
Thanks, Tickles. But unfortanaly, here's MY scripts: The handler moves 2 steps when you press the up arrow. The DOG just forever goes TO the handler. I'm thinking of ways to tweak your scripts to make them work.
(Sorry, I can't spell unfortanaly.. DX )
Offline
I might be able to help if you give me a link to the project.
Offline