This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-10-11 17:37:27

acevipa
Scratcher
Registered: 2007-10-09
Posts: 17

Importing Scratch File Into Other Scratch File

I'd like to merge two scratch files by importing one into the other. Is there a way of doing this without one impacting the other, i.e. keeping them both separate so that the scripts and sprites don't interfere with each other. I say this as both scratch files are similiar yet different. It's a penalty shootout game that I'm making and I'd like to merge the 1 player and 2 player game together. And basically, some keys are the same which may interfere with each other. I really need to do this but am having so much trouble. I've pretty much done both single files, the difficult part is merging them.

Offline

 

#2 2007-10-15 09:29:43

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Importing Scratch File Into Other Scratch File

Hi acevipa,

in Scratch you cannot really easily merge several projects and keep them each encapsulated. You can, however, export a sprite from one project and import it into another one. Thus you can completely merge two projects spritewise.

If both your projects use the same or some of the same global variable names, send the same messages and react to the same events, your 'merged project' is bound to behave very weird. You would then have to manually fix this by avoiding such doubles. Also it would probably be a good idea to create at least one 'mode' variable to let your project keep track if it is currently in a single player / double player mode and to let your sprites behave accordingly.

That's a lot of work. It adds much complexity to your two stand-alone projects, without providing any additional benefit. Therefore I'd suggest that you just post both of your projects (the single player one and the multi player version).

Hope that helps
Jens


Jens Mönig

Offline

 

#3 2009-02-16 12:59:15

sailorgrl
Scratcher
Registered: 2009-02-07
Posts: 20

Re: Importing Scratch File Into Other Scratch File

Can you merge five projects together or is that getting a little bit extensive? Because I have five levels (well I am going to eventually) in my game.
             Sailorgrl

Last edited by sailorgrl (2009-02-16 12:59:33)

Offline

 

#4 2009-02-16 13:02:15

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Importing Scratch File Into Other Scratch File

my lunar com is 6 projects in one (i think thats the number), so yea, 5 levels should just about work. one glitch with importing though, the variables start acting strangly, and needs to be replaced, simply drag the variables into the slots, all over again

Offline

 

#5 2009-02-16 16:33:50

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Importing Scratch File Into Other Scratch File

yambanshee wrote:

my lunar com is 6 projects in one (i think thats the number), so yea, 5 levels should just about work. one glitch with importing though, the variables start acting strangly, and needs to be replaced, simply drag the variables into the slots, all over again

I find that if I Save the project, the variables usually sort themselves out without having to replace them.  It saves a lot of time.  You can also use that technique to change from a global variable to a local variable (or vice-versa).  Just delete the variable, make another one with the same name and save the project.  The scripts don't have to be changed at all.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#6 2009-02-17 07:54:55

yambanshee
Scratcher
Registered: 2007-11-06
Posts: 500+

Re: Importing Scratch File Into Other Scratch File

Paddle2See wrote:

yambanshee wrote:

my lunar com is 6 projects in one (i think thats the number), so yea, 5 levels should just about work. one glitch with importing though, the variables start acting strangly, and needs to be replaced, simply drag the variables into the slots, all over again

I find that if I Save the project, the variables usually sort themselves out without having to replace them.  It saves a lot of time.  You can also use that technique to change from a global variable to a local variable (or vice-versa).  Just delete the variable, make another one with the same name and save the project.  The scripts don't have to be changed at all.

Intresting, would have saved me about 10 minutes if i knew that earlier

Offline

 

#7 2009-02-17 12:53:32

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Importing Scratch File Into Other Scratch File

yambanshee wrote:

Paddle2See wrote:

yambanshee wrote:

my lunar com is 6 projects in one (i think thats the number), so yea, 5 levels should just about work. one glitch with importing though, the variables start acting strangly, and needs to be replaced, simply drag the variables into the slots, all over again

I find that if I Save the project, the variables usually sort themselves out without having to replace them.  It saves a lot of time.  You can also use that technique to change from a global variable to a local variable (or vice-versa).  Just delete the variable, make another one with the same name and save the project.  The scripts don't have to be changed at all.

Intresting, would have saved me about 10 minutes if i knew that earlier

I learned it from Jens quite a ways back...maybe we should document it somewhere?


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#8 2009-02-18 05:03:03

ihaveamac
Scratcher
Registered: 2007-09-22
Posts: 1000+

Re: Importing Scratch File Into Other Scratch File

In extras there's something called Import project. Opens the project and merges it with the one you have open but does not save unless you save a different copy.

Was it that?


~ihaveamac - visit ihaveamac.net

Offline

 

#9 2009-02-19 20:15:07

sailorgrl
Scratcher
Registered: 2009-02-07
Posts: 20

Re: Importing Scratch File Into Other Scratch File

ihaveamac wrote:

In extras there's something called Import project. Opens the project and merges it with the one you have open but does not save unless you save a different copy.

Was it that?

I merged two projects that were unimportant to me and it seems as though you were correct!

Offline

 

Board footer