Discuss Scratch
- theonlygusti
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
([ v] of [parent v])
@theonlygusti:Erm, I don't see it.
How about you reread my ENTIRE post.
It provides you with exactly what you need.
- ChildCritic
 - 
                            
						
						
                            Scratcher
                        
						
						 
500+ posts
([ v] of [parent v])
Let's remove the move block as it has a workaround:Please don't misquote me.move (10) steps // we don't need this anymore
go to x: ((x position) + (([sin v] of (direction)) * (number))) y: ((y position) + (([cos v] of (direction)) * (number)) // much better
Let's also remove:I'm not for that, now am I?turn ccw () degreesand the entire custom block section!
turn cw () degrees
point towards [ v]
go to [ v]
glide () secs to x: (0) y: (0)
change x by ()
set x to ()
change y by ()
set y to ()
if on edge, bounce
(x position)
(y position)
say [] for (2) secs
think [] for (2) secs
think []
say []
next costume
switch backdrop to [ v]
change [ v] effect by (25)
clear graphic effects
change size by ()
go to front
(costume #)
(size)
switch backdrop to [ v] and wait
next backdrop
play sound [ v] until done
set volume to (volume) %
set tempo to () bpm
set pen color to ()
set pen shade to ()
set pen size to ()
when [ v] key pressed
when this sprite clicked
when backdrop switches to [ v]
when I receive [ v]
broadcast [ v]
broadcast [ v] and wait
wait () secs
repeat ()
forever
wait until <touching color [#ff0088] ?>
(timer)
reset timer
([(() - (0)) v] of [ v])
set [ v] to [ ]
add [] to [ v]
replace item ( v) of [ v] with [ ]
<[ v] contains [ ]>
(length of [ v])
(distance to [ v])
(length of [])
(letter () of [world])
(join [] [world])
<<> or <>>
(() * (0))
(pick random (1) to (10)
<[] = [ ]>
@theonlygusti:Erm, I don't see it.
How about you reread my ENTIRE post.
It provides you with exactly what you need.
Okay. Let's do this thoroughly.IDK what to do if you still can't see.
This works if a clone's parent is a clone.
Just add before the cloning:set [saveparent v] to (parent)//localThis works if the parent is not a clone
set [parent v] to (Clone number)//also local
create clone of [myself v]
set [parent v] to (saveparent)
Last edited by ChildCritic (April 25, 2016 19:30:04)
- pvz_pro
 - 
                            
						
						
                            Scratcher
                        
						
						 
500+ posts
([ v] of [parent v])
@ChildCritic
the term “parent” is commonly used in programing and it is not used anywhere in scratch
                        
                        
                    the term “parent” is commonly used in programing and it is not used anywhere in scratch
- Sheep_maker
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
([ v] of [parent v])
@ChildCriticI think the term “original” would be better
the term “parent” is commonly used in programing and it is not used anywhere in scratch
- Jonathan50
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
([ v] of [parent v])
Full support.
                        
                        
                    I think the parent would be the stage. But what would the stage's parent be?The stage shouldn't have a parent. The option shouldn't show in the stage and the return could just be undefined if the block was dragged into the Stage.
- theonlygusti
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
([ v] of [parent v])
Full support.The stage shouldn't be another sprite's parent either, unless the ST add local variables to the stage then there is no reason to be able to access its properties.I think the parent would be the stage. But what would the stage's parent be?The stage shouldn't have a parent. The option shouldn't show in the stage and the return could just be undefined if the block was dragged into the Stage.
- joefarebrother
 - 
                            
						
						
                            Scratcher
                        
						
						 
500+ posts
([ v] of [parent v])
Support. I believe this is possible in Snap!
                        
                        
                    - Jonathan50
 - 
                            
						
						
                            Scratcher
                        
						
						 
1000+ posts
([ v] of [parent v])
But the Stage sort of already is the parent of all sprites.Full support.The stage shouldn't be another sprite's parent either, unless the ST add local variables to the stage then there is no reason to be able to access its properties.I think the parent would be the stage. But what would the stage's parent be?The stage shouldn't have a parent. The option shouldn't show in the stage and the return could just be undefined if the block was dragged into the Stage.
This is why you can't make variables private to the stage – global variables actually belong to the stage.
In a project.json file you'll see that Sprites are all children of the Stage.
- TopicBumper
 - 
                            
						
						
                            New Scratcher
                        
						
						 
100+ posts
([ v] of [parent v])
b u m pDitto.
Oh crud, I haven't realized I'm now entering the 40's when it comes to number of posts soon. That means I'm almost done…
            






