Discuss Scratch

sampathcse16
Scratcher
29 posts

Can i access a variable which is defined in other sprite?

For example if i have two sprites like sprite1 and sprite2 . If i define one variable in sprite1, can i access the value of that variable in sprite 2 script?
drmcw
Scratcher
1000+ posts

Can i access a variable which is defined in other sprite?

Yes in the sensing blocks
([variable v] of [other sprite  v])

Last edited by drmcw (May 29, 2015 16:04:53)

sampathcse16
Scratcher
29 posts

Can i access a variable which is defined in other sprite?

Thank you so much for your quick help.
simplecat11
Scratcher
11 posts

Can i access a variable which is defined in other sprite?

What if u have to save a project in a way you can make like a part 2 to it and scratch cat can remember all your answers, u can't just do
(answer)
show variable [ v]
deck26
Scratcher
1000+ posts

Can i access a variable which is defined in other sprite?

simplecat11 wrote:

What if u have to save a project in a way you can make like a part 2 to it and scratch cat can remember all your answers, u can't just do
(answer)
show variable [ v]
Please create a new topic rather than necroposting. I don't know of any way of transferring data from one project to another.

Powered by DjangoBB