Discuss Scratch

gregory9
Scratcher
100+ posts

How do you program a block so that Scratch 1.4 ignores it when the script is running?

Just read the title.

Use DuckDuckGo instead of Google, Bing, or Yahoo

Check out Coursacado, and SBX Share!

I am gw90 on GitHub
davidkt
Scratcher
1000+ posts

How do you program a block so that Scratch 1.4 ignores it when the script is running?

define do nothing
do nothing

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
djdolphin
Scratcher
1000+ posts

How do you program a block so that Scratch 1.4 ignores it when the script is running?

Just replace the block's code with:
^ self.

Last edited by djdolphin (Nov. 2, 2013 21:31:50)


!
gregory9
Scratcher
100+ posts

How do you program a block so that Scratch 1.4 ignores it when the script is running?

djdolphin wrote:

Just replace the block's code with:
^ self.
It doesn't work. Sorry.

Last edited by gregory9 (Nov. 3, 2013 13:16:17)


Use DuckDuckGo instead of Google, Bing, or Yahoo

Check out Coursacado, and SBX Share!

I am gw90 on GitHub
davidkt
Scratcher
1000+ posts

How do you program a block so that Scratch 1.4 ignores it when the script is running?

davidkt wrote:

define do nothing
do nothing
Oh. 1.4.

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
blob8108
Scratcher
1000+ posts

How do you program a block so that Scratch 1.4 ignores it when the script is running?

davidkt wrote:

davidkt wrote:

define do nothing
do nothing
Oh. 1.4.
That doesn't even do nothing. It recurses infinitely.

tosh · slowly becoming a grown-up adult and very confused about it
nXIII
Scratcher
1000+ posts

How do you program a block so that Scratch 1.4 ignores it when the script is running?

repeat (0.1)
say [Hello!] // Only Scratch 1.4 will run this
end

Thus, you can do this:

set [Scratch 2.0? v] to [true]
repeat (0.1)
set [Scratch 2.0? v] to [false]
end

And use normal if statements.

nXIII · GitHub
gregory9
Scratcher
100+ posts

How do you program a block so that Scratch 1.4 ignores it when the script is running?

nXIII wrote:

repeat (0.1)
say [Hello!] // Only Scratch 1.4 will run this
end

Thus, you can do this:

set [Scratch 2.0? v] to [true]
repeat (0.1)
set [Scratch 2.0? v] to [false]
end

And use normal if statements.

I don't understand that.

Use DuckDuckGo instead of Google, Bing, or Yahoo

Check out Coursacado, and SBX Share!

I am gw90 on GitHub
blob8108
Scratcher
1000+ posts

How do you program a block so that Scratch 1.4 ignores it when the script is running?

nXIII wrote:

set [Scratch 2.0? v] to [true]
repeat (0.1)
set [Scratch 2.0? v] to [false]
end
Wow, that's subtle. How did you come across that?!

tosh · slowly becoming a grown-up adult and very confused about it
scimonster
Scratcher
1000+ posts

How do you program a block so that Scratch 1.4 ignores it when the script is running?

nXIII wrote:

repeat (0.1)
say [Hello!] // Only Scratch 1.4 will run this
end

Thus, you can do this:

set [Scratch 2.0? v] to [true]
repeat (0.1)
set [Scratch 2.0? v] to [false]
end

And use normal if statements.
Why, does 1.4 round up, while 2.0 rounds? Does 1.4 require repeats to run at least once?

Retired Community Moderator
BTW, i run Google Chrome 41.0.2272.101 on a Linux system - Ubuntu 14.04. NEW: iPad 4th gen. w/retina.

418 I'm a teapot (original - to be read by bored computer geeks)
THE GAME (you just lost)
; THE SEMICOLON LIVES ON IN OUR SIGS
bobbybee
Scratcher
1000+ posts

How do you program a block so that Scratch 1.4 ignores it when the script is running?

nXIII wrote:

repeat (0.1)
say [Hello!] // Only Scratch 1.4 will run this
end

Thus, you can do this:

set [Scratch 2.0? v] to [true]
repeat (0.1)
set [Scratch 2.0? v] to [false]
end

And use normal if statements.

Now.. someone needs an HTML5 player tester…

“Ooo, can I call you Señorita Bee?” ~Chibi-Matoran
technoboy10
Scratcher
1000+ posts

How do you program a block so that Scratch 1.4 ignores it when the script is running?

repeat (0.1)
say [Hello!]
end
Also runs in the HTML5 player at the moment.

trans rights are human rights
nXIII
Scratcher
1000+ posts

How do you program a block so that Scratch 1.4 ignores it when the script is running?

blob8108 wrote:

nXIII wrote:

set [Scratch 2.0? v] to [true]
repeat (0.1)
set [Scratch 2.0? v] to [false]
end
Wow, that's subtle. How did you come across that?!
I was implementing doRepeat and I couldn't remember what either player did, so I tested both.

EDIT: https://github.com/nathan/phosphorus/blob/8f9e6e69d3995c47ba236552fee8ee7f4df9add2/phosphorus.js#L1430

Last edited by nXIII (Nov. 7, 2013 00:57:01)


nXIII · GitHub
davidkt
Scratcher
1000+ posts

How do you program a block so that Scratch 1.4 ignores it when the script is running?

blob8108 wrote:

davidkt wrote:

davidkt wrote:

define do nothing
do nothing
Oh. 1.4.
That doesn't even do nothing. It recurses infinitely.
Okay…
define do nothing

Remember when I looked like this? I still do.


Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
Wasdkeys123
Scratcher
48 posts

How do you program a block so that Scratch 1.4 ignores it when the script is running?

Just don't make a script.OR:
when green flag clicked
forever
stop script
end

Last edited by Wasdkeys123 (May 4, 2014 19:25:45)

Powered by DjangoBB