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

#26 2012-09-19 16:00:56

bullelk12
Scratcher
Registered: 2012-05-26
Posts: 100+

Re: Scripts Workshop: Give and get help with scripts

I finally found it again. I disappeared for a bit.


http://mag.racked.eu/cimage/i6000/Achievement++get%21/Scratcher+love+minecraft%21/mca.png

Offline

 

#27 2012-09-20 13:21:56

JH1010
Scratcher
Registered: 2012-05-31
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

bullelk12 wrote:

I finally found it again. I disappeared for a bit.

Sorry, I changed the title.

Offline

 

#28 2012-09-20 15:30:07

Averydan
New Scratcher
Registered: 2012-09-03
Posts: 8

Re: Scripts Workshop: Give and get help with scripts

Can I join?  Scratch says I'm new, but I'm not, I'm just new to the site.

Offline

 

#29 2012-09-21 02:00:39

JH1010
Scratcher
Registered: 2012-05-31
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

Averydan wrote:

Can I join?  Scratch says I'm new, but I'm not, I'm just new to the site.

Doesn't matter. We accept anyone.

Offline

 

#30 2012-09-22 13:26:51

JH1010
Scratcher
Registered: 2012-05-31
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

Bump.

Offline

 

#31 2012-09-23 10:04:43

Jodymoses
Scratcher
Registered: 2012-05-03
Posts: 100+

Re: Scripts Workshop: Give and get help with scripts

Um guys...


http://i46.tinypic.com/2hxwx9s.png
I Have Huge Ideas, But Only If You Listen And Talk To Me...

Offline

 

#32 2012-09-23 10:15:48

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

Jodymoses wrote:

Um guys...

Yes… ?

Last edited by ErnieParke (2012-09-23 10:16:13)


http://i46.tinypic.com/35ismmc.png

Offline

 

#33 2012-09-23 13:01:29

JH1010
Scratcher
Registered: 2012-05-31
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

ErnieParke wrote:

Jodymoses wrote:

Um guys...

Yes… ?

Exactly what I was thinking.

Offline

 

#34 2012-09-24 05:57:28

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

I think you should link to the post where the problem was resolved in the OP.


http://i50.tinypic.com/312u714.jpg

Offline

 

#35 2012-09-24 10:16:07

Jodymoses
Scratcher
Registered: 2012-05-03
Posts: 100+

Re: Scripts Workshop: Give and get help with scripts

JH1010 shouldnt it be

when gf clicked
forever
change y by (yv v)
if <touching colour>
set yv v to [1]
if <key up pressed?>
set yv v to [6]
end
change yv v by [-0.25]
end
end
to the post above?
Please fix...


http://i46.tinypic.com/2hxwx9s.png
I Have Huge Ideas, But Only If You Listen And Talk To Me...

Offline

 

#36 2012-09-24 11:23:03

JH1010
Scratcher
Registered: 2012-05-31
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

BirdByte wrote:

I think you should link to the post where the problem was resolved in the OP.

I tried but it didn't work.

Jodymoses wrote:

JH1010 shouldnt it be

when gf clicked
forever
change y by <yv>
if <touching colour [#000000]?>
set [yv v] to (1) // This should be zero.
if <key [up arrow v] pressed?>
set [yv v] to (6) // I opted for the change y veocity by 6 block here but that works too.
end
change [yv v] by (-0.25) // This should not be in this loop because it would lower you through the ground. Also, I forgot the minus in my example.
end
end
to the post above?
Please fix...

Fixed and explained. Also, if you highlight the yellow stuff it will appear in google toolbar so you can read the end of it.

Last edited by JH1010 (2012-09-24 11:25:18)

Offline

 

#37 2012-09-24 11:24:35

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

Jodymoses wrote:

JH1010 shouldnt it be

when gf clicked
forever
 change y by (yv)
 if <touching color [#FFFFFF]?>
  set [yv v] to [1]
  if <key [up arrow v] pressed?>
   set [yv v] to [6]
  end
  change [yv v] by [-0.25]
 end
end
to the post above?
Please fix...

Fixed, and that wouldn't work.

@JH1010 What went wrong?

Last edited by BirdByte (2012-09-24 11:25:57)


http://i50.tinypic.com/312u714.jpg

Offline

 

#38 2012-09-24 11:26:32

JH1010
Scratcher
Registered: 2012-05-31
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

BirdByte wrote:

Jodymoses wrote:

JH1010 shouldnt it be

when gf clicked
forever
 change y by (yv)
 if <touching color [#FFFFFF]?>
  set [yv v] to [1]
  if <key [up arrow v] pressed?>
   set [yv v] to [6]
  end
  change [yv v] by [-0.25]
 end
end
to the post above?
Please fix...

Fixed, and that wouldn't work.

@JH1010 What went wrong?

Outposted. What went wrong with what?

Last edited by JH1010 (2012-09-24 11:26:50)

Offline

 

#39 2012-09-24 11:27:32

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

JH1010 wrote:

BirdByte wrote:

Jodymoses wrote:

JH1010 shouldnt it be

when gf clicked
forever
 change y by (yv)
 if <touching color [#FFFFFF]?>
  set [yv v] to [1]
  if <key [up arrow v] pressed?>
   set [yv v] to [6]
  end
  change [yv v] by [-0.25]
 end
end
to the post above?
Please fix...

Fixed, and that wouldn't work.

@JH1010 What went wrong?

Outposted. What went wrong with what?

The link to the solution in OP.


http://i50.tinypic.com/312u714.jpg

Offline

 

#40 2012-09-24 11:29:04

JH1010
Scratcher
Registered: 2012-05-31
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

BirdByte wrote:

JH1010 wrote:

BirdByte wrote:


Fixed, and that wouldn't work.

@JH1010 What went wrong?

Outposted. What went wrong with what?

The link to the solution in OP.

It kept linking to the last post, then kept linking to the first post.

Offline

 

#41 2012-09-24 11:30:54

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

JH1010 wrote:

BirdByte wrote:

JH1010 wrote:


Outposted. What went wrong with what?

The link to the solution in OP.

It kept linking to the last post, then kept linking to the first post.

Did you use this code?

Code:

[url=http://scratch.mit.edu/forums/viewtopic.php?pid=1393352#p1393352]Gravity/Jumping[/url]

http://i50.tinypic.com/312u714.jpg

Offline

 

#42 2012-09-24 11:36:56

JH1010
Scratcher
Registered: 2012-05-31
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

BirdByte wrote:

JH1010 wrote:

BirdByte wrote:


The link to the solution in OP.

It kept linking to the last post, then kept linking to the first post.

Did you use this code?

Code:

[url=http://scratch.mit.edu/forums/viewtopic.php?pid=1393352#p1393352]Gravity/Jumping[/url]

Thanks this worked.

Offline

 

#43 2012-09-25 16:22:07

Jodymoses
Scratcher
Registered: 2012-05-03
Posts: 100+

Re: Scripts Workshop: Give and get help with scripts

My bad...  sad


http://i46.tinypic.com/2hxwx9s.png
I Have Huge Ideas, But Only If You Listen And Talk To Me...

Offline

 

#44 2012-09-26 00:19:20

strawpile
New Scratcher
Registered: 2012-07-17
Posts: 2

Re: Scripts Workshop: Give and get help with scripts

Having a problem with playing a sound when one sprite touches another. The code for the whole program is quite lengthy, but the part plays the sound is rather simple:

when space key pressed
show
go to x:25 y:25
forever
move 5 steps
if on edge bounce
if touching sprite 1
play sound (cricket) until done
if touching sprite 7
go to sprite 6
if touching sprite 6 
go to sprite 7
end forever loop
When space key pressed
forever
if touching sprite 1
hide
wait 1 sec
show
end forever loop
When I run the script, the sprite will always hide at the appropriate time, but it will often not play the cricket sound.  Most of the time it does, but sometimes it doesn't.  Is it because there are too many other scripts that are all being executed at the same time?  Or is it because the hide block interferes with the cricket sound block?  Any help would be appreciated.

Offline

 

#45 2012-09-26 01:00:27

Jodymoses
Scratcher
Registered: 2012-05-03
Posts: 100+

Re: Scripts Workshop: Give and get help with scripts

I would exchange hide with set ghost to 100 and show with set ghost to 0.

when gf clicked
forever
if <[touching [sprite 1]]>
set [ghost] effect to [100]//hide
end
else
set [ghost] effect to [0]//show
end
end
fix please

Last edited by Jodymoses (2012-09-26 01:11:15)


http://i46.tinypic.com/2hxwx9s.png
I Have Huge Ideas, But Only If You Listen And Talk To Me...

Offline

 

#46 2012-09-26 05:39:47

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: Scripts Workshop: Give and get help with scripts

Jodymoses wrote:

I would exchange hide with set ghost to 100 and show with set ghost to 0.

when gf clicked
forever
if <touching [sprite1 v]?>
set [ghost] effect to [100]//hide
else
set [ghost] effect to [0]//show
end
end
fix please

Fixed,

strawpile wrote:

Having a problem with playing a sound when one sprite touches another. The code for the whole program is quite lengthy, but the part plays the sound is rather simple:

when [space v] key pressed
show
go to x: (25) y: (25)
forever
 move (5) steps
 if on edge, bounce
 if <touching [sprite1 v]?>
  play sound [cricket v] until done
 end
 if <touching [sprite7 v]?>
  go to [sprite6 v]
 end
 if <touching [sprite6 v]?> 
  go to [sprite7 v]
 end
end
when [space v] key pressed
forever
 if <touching [sprite1 v]?>
  hide
  wait (1) secs
  show
 end
end
When I run the script, the sprite will always hide at the appropriate time, but it will often not play the cricket sound.  Most of the time it does, but sometimes it doesn't.  Is it because there are too many other scripts that are all being executed at the same time?  Or is it because the hide block interferes with the cricket sound block?  Any help would be appreciated.

I fixed your scratchblocks code  smile

Now, you could do what Jodymoses said, but here's another solution:

when [space v] key pressed
show
go to x: (25) y: (25)
forever
 move (5) steps
 if on edge, bounce
 if <touching [sprite1 v]?>
  broadcast [hide v]
  play sound [cricket v] until done
 end
 if <touching [sprite7 v]?>
  go to [sprite6 v]
 end
 if <touching [sprite6 v]?> 
  go to [sprite7 v]
 end
end
when i receive [hide v]
hide
wait (1) secs
show

Last edited by BirdByte (2012-09-26 05:40:06)


http://i50.tinypic.com/312u714.jpg

Offline

 

#47 2012-09-26 12:21:05

Jodymoses
Scratcher
Registered: 2012-05-03
Posts: 100+

Re: Scripts Workshop: Give and get help with scripts

Yep 'cos ghost 100 just makes it invisible but not inactive, while hide makes it inactive


http://i46.tinypic.com/2hxwx9s.png
I Have Huge Ideas, But Only If You Listen And Talk To Me...

Offline

 

#48 2012-09-26 12:23:24

firedrake969_test
Scratcher
Registered: 2012-08-08
Posts: 500+

Re: Scripts Workshop: Give and get help with scripts

Jodymoses wrote:

Yep 'cos ghost 100 just makes it invisible but not inactive, while hide makes it inactive

Actually, hide makes it unable to sense/be sensed, but it can move.


Alt of Firedrake969.

Offline

 

#49 2012-09-26 12:39:35

Jodymoses
Scratcher
Registered: 2012-05-03
Posts: 100+

Re: Scripts Workshop: Give and get help with scripts

Oh is it


http://i46.tinypic.com/2hxwx9s.png
I Have Huge Ideas, But Only If You Listen And Talk To Me...

Offline

 

#50 2012-09-26 20:43:30

strawpile
New Scratcher
Registered: 2012-07-17
Posts: 2

Re: Scripts Workshop: Give and get help with scripts

Great,  thanks for the solutions.  BTW, where can I find a list of commands used in the scratchblocks code?

Offline

 

Board footer