Discuss Scratch

awsome_guy_360
Scratcher
1000+ posts

Replace [Block] with [Block]

Alright, so… how do I start this off? XD

I would think a replace ___ with ___ feature would be useful in the Scratch editor, for example:

Tyssvvm to QqUuliNnNn for making this image/mockup. XD

So say you want to replace an option or a boolean on a sprite for a two player game. You've already made the sprite for player one, all you need to do is duplicate the sprite, change the costumes…

Aaaand change the controls, which can be a pain. So I was thinking this is where the shortcut would come in handy:

Replace:
<key [right arrow v] pressed?>
with
<key [d v] pressed?>

The same would work for cap blocks (and of course, the standard Scratch block):

Replace:
when green flag clicked
with
when I receive [message 1 v]

Note:To clarify, the tool will have a block search feature and you'll be able to place multiple blocks.




Last edited by awsome_guy_360 (Feb. 20, 2018 02:57:42)


P R E P A R E__F O R__I R O N Y
DominoDragon1
Scratcher
1000+ posts

Replace [Block] with [Block]

Great idea! This is a feature that many other languages and text editors use. You should also be able to replace groups of blocks, such as:
Replace
<key [up arrow v] pressed?>
With
<<key [up arrow v] pressed?> or <key [w v] pressed?>>

Useful for things like adding wasd to a project.

There are 10 kinds of people in the world, those who know binary and those who don't. “And those who think they do but are still waiting on 8 more people.” (Sigton).
awsome_guy_360
Scratcher
1000+ posts

Replace [Block] with [Block]

DominoDragon1 wrote:

Great idea! This is a feature that many other languages and text editors use. You should also be able to replace groups of blocks, such as:
Replace
<key [up arrow v] pressed?>
With
<<key [up arrow v] pressed?> or <key [w v] pressed?>>

Useful for things like adding wasd to a project.

Ooo yeah. Multiple blocks are a good idea. Probably it could work vice versa as well?

Replace
<<key [up arrow v] pressed?> or <key [w v] pressed?>>
With
<key [up arrow v] pressed?> 

Last edited by awsome_guy_360 (May 20, 2017 01:58:42)


P R E P A R E__F O R__I R O N Y
redgreenandblue
Scratcher
100+ posts

Replace [Block] with [Block]

yes yes yes. Beyond needed, would make programming so much easier!

Play Fun Games!

ColinMedia6
Scratcher
43 posts

Replace [Block] with [Block]

Supported! Imagine if there's replace with:
Replace the
<<key [d v] pressed?> or <key [right arrow v] pressed?>>
to
<key [right arrow v] pressed?>
awsome_guy_360
Scratcher
1000+ posts

Replace [Block] with [Block]

-BUMP-

P R E P A R E__F O R__I R O N Y
awsome_guy_360
Scratcher
1000+ posts

Replace [Block] with [Block]

awsome_guy_360 wrote:

-BUMP-

Last edited by awsome_guy_360 (May 26, 2017 00:56:26)


P R E P A R E__F O R__I R O N Y
Blaze349
Scratcher
1000+ posts

Replace [Block] with [Block]

But you can easily do this in Tosh.
duckboycool
Scratcher
1000+ posts

Replace [Block] with [Block]

Blaze349 wrote:

But you can easily do this in Tosh.
Scratch isn't Tosh though. Some people prefer to code in Scratch itself rather than just use Tosh and share it as a project on Scratch.

I personally no support since I think it would have to either be a complicated system, or would only be able to do single blocks at a time, which isn't much more effective.

I have different types of projects at my Profile including my Better Talking Tutorial, Cookie clicker, and My Calculator Project



Have a happy 2018!
Penguin9090_new
Scratcher
500+ posts

Replace [Block] with [Block]

Support!

CLICK PLZ: Games Art Particles Animations Others

There could be invisible text but probably not –>am i wasting your time? Don't click this link. Really. Don't. Click. It.
Click here to dislike my posts!
braxbroscratcher
Scratcher
1000+ posts

Replace [Block] with [Block]

duckboycool wrote:

Blaze349 wrote:

But you can easily do this in Tosh.
Scratch isn't Tosh though. Some people prefer to code in Scratch itself rather than just use Tosh and share it as a project on Scratch.

I personally no support since I think it would have to either be a complicated system, or would only be able to do single blocks at a time, which isn't much more effective.
It wouldn't HAVE to be complicated, as Scratch is textual when saved anyway. It's just a simple replace function - every text editor has one.


Current Project:
n/a
Quotes: “In our last hour, we burn the most brightly, trying to deny that we are burning out.” -Me
“Well, no. 1024 Killerbytes make a Murderbyte.” -MegaByteCorporations
“I hate out of context quotes.” -Me
“I hate it when Cubeupload breaks.” -Also me
awsome_guy_360
Scratcher
1000+ posts

Replace [Block] with [Block]

--BUMP--

P R E P A R E__F O R__I R O N Y
awsome_guy_360
Scratcher
1000+ posts

Replace [Block] with [Block]

--BUMP--

P R E P A R E__F O R__I R O N Y
walkcycle
Scratcher
500+ posts

Replace [Block] with [Block]

Support.

Blaze349 wrote:

But you can easily do this in Tosh.

Does it work to open a Scratch project in Tosh, find/replace, and then come back to Scratch? Is the project otherwise the same?
Blaze349
Scratcher
1000+ posts

Replace [Block] with [Block]

Yes. It remains the same.
CSRGaming
Scratcher
16 posts

Replace [Block] with [Block]

Support, if you can also do the replace in only one sprite, or all sprites.
Voltjas
Scratcher
38 posts

Replace [Block] with [Block]

Wait, it's either I didn't read it right, or it wasn't there, but would it replace all of that type in that sprite? Or just 1 block, and if so, what would it look like?

I may have less than 50 posts, but that doesn't mean I'm a noob, just means I don't use DISCUSS much.

if <[Voltjas] = <[Awesome] or [Helpful]>> then 
Then [Visit My Profile]
Profile [https://scratch.mit.edu/users/Voltjas/]


else
Then [I don't know]
end
awsome_guy_360
Scratcher
1000+ posts

Replace [Block] with [Block]

Voltjas wrote:

Wait, it's either I didn't read it right, or it wasn't there, but would it replace all of that type in that sprite? Or just 1 block, and if so, what would it look like?
It would replace all the blocks of that type in the sprite. I was imagining a screen similar to a pop up.

Ex: If you want to change all instances of this:
if <key [up arrow v] pressed?> then
...
end


Replace:
<key [up arrow v] pressed?>
with
<key [w v] pressed?>

P R E P A R E__F O R__I R O N Y
MathlyCat
Scratcher
1000+ posts

Replace [Block] with [Block]

awsome_guy_360 wrote:

Voltjas wrote:

Wait, it's either I didn't read it right, or it wasn't there, but would it replace all of that type in that sprite? Or just 1 block, and if so, what would it look like?
It would replace all the blocks of that type in the sprite. I was imagining a screen similar to a pop up.

Ex: If you want to change all instances of this:
if <key [up arrow v] pressed?> then
...
end


Replace:
<key [up arrow v] pressed?>
with
<key [w v] pressed?>
Ah I think I got it, so if it replaces all instances in the Sprite!
I didn't catch on for some reason.

Support, generally handy and I've had that situation.

Go make up your bed and work!

Life can be process of trial and error. Yours seems to be error and error.

Powered by DjangoBB

Standard | Mobile