Discuss Scratch

jokebookservice1
Scratcher
1000+ posts

Global Define Blocks (New idea)

Don't instantly go down and write “Duplicate”, read the next few lines first.

Peope have already asked for global “More Blocks”, but they have wanted the sprite making the call to execute the action. What I want is 1 sprite performs the action. Ok, now you can press the “Duplicate” button if i is a duplicate.

A bit more detail…

If you have a “global” definition script in Sprite1, then you could locate the block that calls that definition, in the purple section of Sprite2. You can call the global block from Sprite2, but Sprite1 would execute it.

But how is this better than other methods?…

Currently, global blocks are not supported due to conflict of variables, sounds and costumes. This occurs because the attempted implementation requires each sprite to execute the script as if it was in their script section. Now, all variables, costumes, and sounds behave normally because they are just broadcasts that accept arguments

Um, no support, there is no use for this…
Consider a situation where somebody is making definition scripts for a cloud list module. But the module cannot be called without broadcasts (and variables to pass arguments) or having scripts placed into the sprite with the definitions, making the editor messy.

Please, do let me know if this is a duplicate (of my particular idea, not global defs in general) and preferably provide a link. I will then happily close this topic. EDIT: It is, but two topic were closed referencing each other as duplicates (lol) so I'll keep this open

EDIT: Clones would not execute the scripts.

EDIT: Somebody mentioned an extra idea here
EDIT: Reminder; the workaround exists, but it seems inconvenient, and uses lists + broadcasts

Last edited by jokebookservice1 (June 4, 2016 23:51:34)

DaSpudLord
Scratcher
1000+ posts

Global Define Blocks (New idea)

Support.
jokebookservice1
Scratcher
1000+ posts

Global Define Blocks (New idea)

DaSpudLord wrote:

Support.
Thanks, I was worried this might be a duplicate.
Zro716
Scratcher
1000+ posts

Global Define Blocks (New idea)

The main discussion is over here, and it contains much more content and detail.
jokebookservice1
Scratcher
1000+ posts

Global Define Blocks (New idea)

Zro716 wrote:

The main discussion is over here, and it contains much more content and detail.
Thanks, I saw that a week back, but couldn't find it right now. Do you happen to know if my method has been mentioned yet? (if you don't know, I'll look through myself)
Sheep_maker
Scratcher
1000+ posts

Global Define Blocks (New idea)

So, in a nutshell

jokebookservice1 wrote:

they are just broadcasts that accept arguments
ooh, this is quite interesting. Support, I dislike using lists to pass parameters and having to cut a non-refresh block into two to use a broadcast-and-wait block (because it lags, aka taking more than one frame, in non-refresh blocks).

Say the definition is in Sprite1 and a clone executes the global definition. Would the original parent execute the block or the clone? I'd prefer for it to be the original parent so it makes this more different than our current custom blocks.
jokebookservice1
Scratcher
1000+ posts

Global Define Blocks (New idea)

Sheep_maker wrote:

So, in a nutshell

jokebookservice1 wrote:

they are just broadcasts that accept arguments
ooh, this is quite interesting. Support, I dislike using lists to pass parameters and having to cut a non-refresh block into two to use a broadcast-and-wait block (because it lags, aka taking more than one frame, in non-refresh blocks).

Say the definition is in Sprite1 and a clone executes the global definition. Would the original parent execute the block or the clone? I'd prefer for it to be the original parent so it makes this more different than our current custom blocks.
I would like it to be original parent, but I guess there could be a checkbox for those who don't want that.
jokebookservice1
Scratcher
1000+ posts

Global Define Blocks (New idea)

Sorry to do tis, I don't like to bring up my post, because it can suffocate new posts. But I checked, and the very bottom post has already ben active for a bit. Did you know, that bump can stand for
Bring
Up
My
Post
Zekrom01
Scratcher
1000+ posts

Global Define Blocks (New idea)

I support this!
jokebookservice1
Scratcher
1000+ posts

Global Define Blocks (New idea)

Zekrom01 wrote:

I support this!
Thank you
braxbroscratcher
Scratcher
1000+ posts

Global Define Blocks (New idea)

SUPPORT
Scratcher1002
Scratcher
1000+ posts

Global Define Blocks (New idea)

Zekrom01 wrote:

I support this!

braxbroscratcher wrote:

SUPPORT
Why?
I support, not a reason for it not to be a thing, however workaround:
Broadcast (join [name] [condition])

Last edited by Scratcher1002 (April 17, 2016 19:39:07)

pvz_pro
Scratcher
500+ posts

Global Define Blocks (New idea)

If it's like cloud data, semi-support, one could use it to make free or whitelist chatrooms

Last edited by pvz_pro (April 17, 2016 19:58:22)

jokebookservice1
Scratcher
1000+ posts

Global Define Blocks (New idea)

Scratcher1002 wrote:

Zekrom01 wrote:

I support this!

braxbroscratcher wrote:

SUPPORT
Why?
I support, not a reason for it not to be a thing, however workaround:
Broadcast (join [name] [condition])
I don't believe you quite understand. Yes, with a single and boolean argument this would work, but my suggestion is to allow multiple arguments and to allow different types. And your suggestion would mean increasing memory by duplicating a (possibly large) script to allow for both true and false (which, as mentioned, will not be the only argument of the block)

Thank you for supporting.
jokebookservice1
Scratcher
1000+ posts

Global Define Blocks (New idea)

pvz_pro wrote:

If it's online, semi-support, one could use it to make free or whitelist chatrooms
I on't quite understand. These blocks would be almost identical to:
define (a) (b) (c)
Apart from the fact that the definition could be called from any sprite (or clone), and the sprite with the definition in it would execute it, like a broadcast with arguments. This does affect how you would make global chat rooms (well, just like broadcasts don't, you could use them).

If you are familiar with OOP, it would be a method of a class, the class being the sprite that contains the definition. Another sprite could call the method, (with arguments if they want, just like current purple blocks).

Please could you elaborate on that post, thanks.

Last edited by jokebookservice1 (April 17, 2016 19:53:18)

pvz_pro
Scratcher
500+ posts

Global Define Blocks (New idea)

pvz_pro wrote:

If it's like cloud data, semi-support, one could use it to make free or whitelist chatrooms
edited this
jokebookservice1
Scratcher
1000+ posts

Global Define Blocks (New idea)

B
R
I
N
G
U
P
M
Y
P
O
S
T
(bump)
b = 2
u = 21
m = 13
p = 16
b + u + m + p = 52
len(bump) = 4
52 / 4 = 13
and there you go, bump is a magic number, because 13 is unlucky.

I guess my point is BUMP.
A-no-meep
Scratcher
100+ posts

Global Define Blocks (New idea)

I support this idea! This would work amazingly!
jokebookservice1
Scratcher
1000+ posts

Global Define Blocks (New idea)

A-no-meep wrote:

I support this idea! This would work amazingly!
Thanks!
ChildCritic
Scratcher
500+ posts

Global Define Blocks (New idea)

support.
Also you had 6 supporters listed before me.

Powered by DjangoBB