Discuss Scratch

t01775944043
New Scratcher
1 post

List of Helpful Topics for Scripting

Education is the process of facilitating learning or the acquisition of knowledge,skills,values,beliefs an habits.Education is more than just learning from books.To know more click this link SSC Result 2017

Last edited by t01775944043 (Feb. 27, 2017 10:12:11)

amaquate
Scratcher
100+ posts

List of Helpful Topics for Scripting

I need help on my Pen Platformer and the engine for the character so it moves and doesn't leave a trail
arfmania66
Scratcher
20 posts

List of Helpful Topics for Scripting

simonusn wrote:

I think it would be very cool if your game was multiplayer.
Well, first of all there are already games like this. I find it nice that you would suggest this, but if you search, “multiplayer games” on Scratch you would already find a lot of results. Thx though!
dusty22
Scratcher
100+ posts

List of Helpful Topics for Scripting

EDIT: Nevermind.

Last edited by dusty22 (March 7, 2017 16:10:57)

tayimahm06
Scratcher
1 post

List of Helpful Topics for Scripting

frank235
New Scratcher
1 post

List of Helpful Topics for Scripting

Someday, there’s going to be an updated version of me.
whoselineisitanyway
New Scratcher
1 post

List of Helpful Topics for Scripting

I no it can b done buy sellin cartoons?
asivi
Scratcher
1000+ posts

List of Helpful Topics for Scripting

Hi, recently @TheLogFather, one of the best programmers and helpers in Scratch and probably having a similar knowledge than the ST programmers about how the editor works has posted an helpful response in this forum showing an script able to stop a single sound without affecting others:

TheLogFather wrote:

You have your sound playing in a forever loop, so there is nothing that can make it stop once it has started.

Try this:

when GF clicked
set [on v] to [0]
when this sprite clicked
set [on v] to ((1)-(on)) // toggles 'on' between zero and one
if <(on)=[1]> then
forever
play sound [pluck v] until done // see note below!
wait (1) secs // whatever gap you need between plucks
end
end

The way Scratch treats “when clicked” hat block scripts is… well… ‘interesting’…


When you click, if the script was still running from a previous click then the script gets terminated and will restart. That means the ‘forever’ loop in there *will* end if it's running, so the sound will stop.

Also, if the sound is being played using “until done” then that sound will *also* get stopped immediately. However, if it was just a “play sound” block (no ‘until done’) then the sound will continue to play to its end, even though the script itself was terminated and will not finish the subsequent “wait” block.

You can use that difference to choose whether you want the sound to continue playing to its end even when clicked again (don't use “until done”), or instead have the sound ‘cut off’ straight away when clicked again (use “until done”).


The really great advantage to doing it like this is that it doesn't need a “stop all sounds” block, so it doesn't interfere at all with any other sounds that may be playing… :)

Yeah, bit complicated, but hope it makes some sense!


Thanks @TheLogFather for his effort discovering those unexpected hidden surprising features that Scratch has and spreading the word.
Regards.
MiniEevee309
Scratcher
3 posts

List of Helpful Topics for Scripting

So…I don't get something. Every block in pen is confusing except for stamp and that other block. I can't get a “clear” explanation on any of the other blocks. (Anyone? No? Yeah I probably deserved that.)
Jayink1
Scratcher
100+ posts

List of Helpful Topics for Scripting

……
TheGoodGuy8000
Scratcher
36 posts

List of Helpful Topics for Scripting

I need help with FPS
UberSuperRare
Scratcher
5 posts

List of Helpful Topics for Scripting

mcpgirl wrote:

I have a question… I'm working on a game right now, and the main thing I'm using in the game is a list. But for some weird reason there is no block that says: replace this with that. It's: replace 1 with that. What if I don't want 1, what if I want something else. Is there anything I can do?
UberSuperRare
Scratcher
5 posts

List of Helpful Topics for Scripting

I still do not have cloud data and I have been scratching for almost a year and I have been very active
can someone tell me why I don't have it yet???????????????????????
SecretGorilla89
Scratcher
32 posts

List of Helpful Topics for Scripting


UberSuperRare wrote:

I still do not have cloud data and I have been scratching for almost a year and I have been very active
can someone tell me why I don't have it yet???????????????????????

it says on your profile that you have been on scratch for a year, yet you have only made 2 post's, Why is that? You dont post anywhere?
sfhg
Scratcher
16 posts

List of Helpful Topics for Scripting

list
more blocks
tips
sfhg
Scratcher
16 posts

List of Helpful Topics for Scripting

My browser / operating system: [quote]Windows 7,[/quote] Chrome 56.0.[list]
[*]
[/list]2924.87, Flash 25.0 (release 0)My browser / operating system: Windows 7, Chrome 56.0.2924.87, Flash 25.0 (release 0)
sfhg
Scratcher
16 posts

List of Helpful Topics for Scripting

How to Make A Password Function
define Ask Password [password]
ask [what is the password] and wait
if <(answer)=(password)> then
say [you win!] for (2) secs
end
when green flag clicked
Ask Password [scratch]

Last edited by sfhg (April 1, 2017 13:03:54)

sfhg
Scratcher
16 posts

List of Helpful Topics for Scripting

How to Make A Password Function
define Ask Password [password]
ask [what is the password] and wait
if <(answer)=(password)> then
say [you win!] for (2) secs
end
when green flag clicked
Ask Password [scratch]


sfhg
Scratcher
16 posts

List of Helpful Topics for Scripting

Cochu10000 wrote:

what the hell is this

Powered by DjangoBB