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

#1 2012-03-16 07:13:34

peniston123
Scratcher
Registered: 2011-10-17
Posts: 25

Help me please...

Well im making a fishing game and when the fish gets 60ft away from you I programmed it to pull so it changes the Distance by 10ft.But I only want it to sent the message "Pull" once how do i do that?Also just to notify that at 60ft away it pulls for ten ft then when you real it in to 60ft again it keeps pulling.So you cant get past 60ft as it will just pull and pull and pull...
Please help and thanks!

Last edited by peniston123 (2012-03-16 07:15:26)

Offline

 

#2 2012-03-16 09:53:35

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: Help me please...

Huh? You mean like this?

when gf clicked
set [pulled? v] to [false]
forever //or whatever your repeat thing is
if <<(distance to [fish v]) > [60]> and <(pulled?) = [1]>> // or whatever number
set [pulled v] to [1]
broadcast [pull v]
end
do other stuff

when gf clicked //or this?
wait until <(distance to [fish v]) > [60]>
broadcast [pull v]
If not, please explain better...

Last edited by Splodgey (2012-03-16 10:04:38)

Offline

 

#3 2012-03-16 10:03:40

zbugni
Scratcher
Registered: 2008-12-13
Posts: 500+

Re: Help me please...

I dont really know what you just said, but try the broadcast and wait block.

Offline

 

#4 2012-03-16 10:07:33

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: Help me please...

zbugni wrote:

I dont really know what you just said, but try the broadcast and wait block.

broadcast [something v] and wait
that broadcast and waits for it to finish so this:
when gf clicked
broadcast [wait v] and wait

when i receive [wait v]
wait (1) secs
Would be the same as this:
when gf clicked
wait (1) secs
Understand that?

Offline

 

#5 2012-03-16 10:45:48

zbugni
Scratcher
Registered: 2008-12-13
Posts: 500+

Re: Help me please...

Splodgey wrote:

zbugni wrote:

I dont really know what you just said, but try the broadcast and wait block.

broadcast [something v] and wait
that broadcast and waits for it to finish so this:
when gf clicked
broadcast [wait v] and wait

when i receive [wait v]
wait (1) secs
Would be the same as this:
when gf clicked
wait (1) secs
Understand that?

Huh? Me?  Ya... I just didn't understand the first guy's wording.

Offline

 

#6 2012-03-16 10:52:43

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: Help me please...

zbugni wrote:

Splodgey wrote:

zbugni wrote:

I dont really know what you just said, but try the broadcast and wait block.

broadcast [something v] and wait
that broadcast and waits for it to finish so this:
when gf clicked
broadcast [wait v] and wait

when i receive [wait v]
wait (1) secs
Would be the same as this:
when gf clicked
wait (1) secs
Understand that?

Huh? Me?  Ya... I just didn't understand the first guy's wording.

It's funny how you say "the first guy" because I'm the same person...  hmm  So in other words, what I was saying there is I don't think that'll make it work. Why didn't you understand my first post? Which part didn't you understand? Doesn't matter but I was wondering in case peniston123 didn't understand.

Last edited by Splodgey (2012-03-16 10:54:56)

Offline

 

#7 2012-03-16 10:55:47

peniston123
Scratcher
Registered: 2011-10-17
Posts: 25

Re: Help me please...

The second one worked!!Thank you!

Offline

 

#8 2012-03-16 13:13:31

zbugni
Scratcher
Registered: 2008-12-13
Posts: 500+

Re: Help me please...

Splodgey wrote:

zbugni wrote:

Splodgey wrote:


broadcast [something v] and wait
that broadcast and waits for it to finish so this:
when gf clicked
broadcast [wait v] and wait

when i receive [wait v]
wait (1) secs
Would be the same as this:
when gf clicked
wait (1) secs
Understand that?

Huh? Me?  Ya... I just didn't understand the first guy's wording.

It's funny how you say "the first guy" because I'm the same person...  hmm  So in other words, what I was saying there is I don't think that'll make it work. Why didn't you understand my first post? Which part didn't you understand? Doesn't matter but I was wondering in case peniston123 didn't understand.

By the first guy I meant peniston, lol sorry.

Offline

 

#9 2012-03-16 14:26:19

Splodgey
Scratcher
Registered: 2011-04-26
Posts: 500+

Re: Help me please...

zbugni wrote:

Splodgey wrote:

zbugni wrote:


Huh? Me?  Ya... I just didn't understand the first guy's wording.

It's funny how you say "the first guy" because I'm the same person...  hmm  So in other words, what I was saying there is I don't think that'll make it work. Why didn't you understand my first post? Which part didn't you understand? Doesn't matter but I was wondering in case peniston123 didn't understand.

By the first guy I meant peniston, lol sorry.

Ohhhh! *facepalm* I should have known...

Offline

 

Board footer