Discuss Scratch
- jokebookservice1
-
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
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)
- jokebookservice1
-
1000+ posts
Global Define Blocks (New idea)
Thanks, I was worried this might be a duplicate. Support.
- jokebookservice1
-
1000+ posts
Global Define Blocks (New idea)
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) The main discussion is over
- Sheep_maker
-
1000+ posts
Global Define Blocks (New idea)
So, in a nutshell
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.
just broadcasts that accept argumentsooh, 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). they are
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
-
1000+ posts
Global Define Blocks (New idea)
I would like it to be original parent, but I guess there could be a checkbox for those who don't want that. So, in a nutshelljust broadcasts that accept argumentsooh, 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). they are
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
-
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
Bring
Up
My
Post
- Scratcher1002
-
1000+ posts
Global Define Blocks (New idea)
I support this!
Why? SUPPORT
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
-
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
-
1000+ posts
Global Define Blocks (New idea)
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)I support this!Why? SUPPORT
I support, not a reason for it not to be a thing, however workaround:Broadcast (join [name] [condition])
Thank you for supporting.
- jokebookservice1
-
1000+ posts
Global Define Blocks (New idea)
I on't quite understand. These blocks would be almost identical to: If it's online, semi-support, one could use it to make free or whitelist chatrooms
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
-
500+ posts
Global Define Blocks (New idea)
edited this If it's like cloud data, semi-support, one could use it to make free or whitelist chatrooms
- jokebookservice1
-
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.
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
-
100+ posts
Global Define Blocks (New idea)
I support this idea! This would work amazingly!
- jokebookservice1
-
1000+ posts
Global Define Blocks (New idea)
Thanks! I support this idea! This would work amazingly!
- ChildCritic
-
500+ posts
Global Define Blocks (New idea)
support.
Also you had 6 supporters listed before me.
Also you had 6 supporters listed before me.