Discuss Scratch

MrKyurem
Scratcher
100+ posts

Two ideas

1. Clone-specific variables.

The idea is that variables can be set to do one of two things: Option 1 would be to act as it currently does, and Option 2 would be for it to use the main variable for non-clone sprites, and make temporary versions of the same variable for each clone. This would be useful for breeding games, evolving games, easily multiplying enemies/interactable sprites and other things.

To set variables to one of these options, right click it, and the options would appear, allowing you to click one to set it to it. Then, when using the variable in scripts, you can also right click the variable blocks (not sure what to call them) to choose one of two things: Use Main Variable or Use Clone Variable. Use Clone Variable will usually use the main variable sprites use, but if the script is interacting with a specific clone, eg, a “Touching boolean?” would use the clone specific variable if it's interacting with a clone.

I hope that made sense, I'm not very good at making things simple…

2. Simulate Green Flag stack block.

<Stimulate Green Flag on (sprite here)>

I find it uses a lot of space to make a new script exactly the same as the original script just to make a simulation of a green flag click if required. What the Simulate Green Flag block would do would make the sprite specified reset, as if someone had clicked the green flag button. The script would finish before it restarts if the sprite specified was the sprite it is in.



(none of this makes any sense does it)

down down start a right right right right right right right right right b a a a a a left left left left b a a right right right right right right right right right b a left left b start a+start up a a a a a a a left left left b left left left b right b right right right right b
14kloska
Scratcher
35 posts

Two ideas

I love your first idea! However, I can't say the same about your second. There is an easy workaround that does basically the same thing: make the green flag trigger a broadcast, which can be received by the function. However, instead of putting a hypothetical “Simulate Green Flag” block, you can make it broadcast the same message. It would basically have the same effect.


sccar3
Scratcher
100+ posts

Two ideas

Sprite's private variables already function as separate variables in clones.

10-year Scratch veteran. Fight me.
cwrivera99
Scratcher
500+ posts

Two ideas

The first idea has already been implemented. For the second idea, you can just create a common broadcast, and put the script under that broadcast. Then make the two starter scripts and put the broadcast under that script. Like this-

When gf Clicked
Broadcast [Example v]
When This Sprite Clicked //This is just an example starter block.
Broadcast [Example v]
When I Receive [Example v]
Run Example Script

Last edited by cwrivera99 (Sept. 19, 2013 19:25:59)


when this block is clicked::sensing hat//FYI, this is my old account that I no longer use. My current account is @DaSpudLord.
forever {do (a [scratch v]::events ring)::sound}::extension cstart
say [what the...?] in (the language of [the moon people v]::red)::control
create [spontaneous v] explosion in [a flea's stomach]::motion
That's not right...::cend
If you are reading this… Then congratulations! You have found the part of my signature that was eaten by a kumquat! (On a side note, you are probably in a kumquat's stomach.) Now get out of the kumquat's stomach and go do something productive with your life. Like playing this game over and over again. Very productive.
Firedrake969
Scratcher
1000+ posts

Two ideas

The problem with the second idea, if I'm understanding it correctly (correct me if I'm not), is that someone could create a project that severely lags up a computer, and then make it impossible to click the stop sign by using when timer > 0 green flag.

'17 rickoid

bf97b44a7fbd33db070f6ade2b7dc549
yuzhouhua
Scratcher
2 posts

Two ideas

where can I set the variable option to “Use Clone Variable” ? I did not find the option in Scratch 2.0 offline version.

any suggestion?
cobraguy
Scratcher
1000+ posts

Two ideas

yuzhouhua wrote:

where can I set the variable option to “Use Clone Variable” ? I did not find the option in Scratch 2.0 offline version.

any suggestion?
You just make the variable for “This Sprite Only”.

Powered by DjangoBB

Standard | Mobile