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

#1 2012-04-21 09:08:25

jasper2428
New Scratcher
Registered: 2012-04-21
Posts: 4

Question: How to create objects while it is running.

Hello, I'm new to scratch.
Is there a function here to create an object via the script?
Sort of like in Java:
Robot a = new Robot
whereas a would have the same scripts and costumes as the original object.

Offline

 

#2 2012-04-21 09:32:15

chanmanpartyman
Scratcher
Registered: 2011-05-30
Posts: 500+

Re: Question: How to create objects while it is running.

Do you mean duplicating or cloning? Currently scratch does not support cloning. However, Scratch 2.0 will most likely. You can download modifications of Scratch such as Panther, BYOB, or Slash. They all support cloning. However, in BYOB you must make a new block called clone. Make it a stack block. Go under operators then make the script:

if <(clone) = (0)>
 be sure to put nothing here!
end
Except the "clone" block will not be orange, it will be green. Then you have your BYOB cloning block.
If this wasn't about cloning I will feel... awkward.

Offline

 

#3 2012-04-21 12:23:19

jasper2428
New Scratcher
Registered: 2012-04-21
Posts: 4

Re: Question: How to create objects while it is running.

Yes it was about cloning.
I wanted to use vanilla scratch.
I was making an RTS game, I pretty much have the diagrams and charts ready to actually start making it but the question came "How do I create new buildings/units? That's essential to the game"
Otherwise I would have created an isometric tactics game.
Well I'm going with that... for now.

Offline

 

#4 2012-04-21 12:26:35

jasper2428
New Scratcher
Registered: 2012-04-21
Posts: 4

Re: Question: How to create objects while it is running.

Could you link those modifications?

Offline

 

#5 2012-04-21 12:32:27

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Question: How to create objects while it is running.

byob.berkeley.edu is for BYOB
patherprogramming.weebly.com is for Panther
I don't recommend Slash at all, and besides I don't know the link.
smile

Offline

 

#6 2012-04-21 20:17:38

chanmanpartyman
Scratcher
Registered: 2011-05-30
Posts: 500+

Re: Question: How to create objects while it is running.

LS97 wrote:

byob.berkeley.edu is for BYOB
patherprogramming.weebly.com is for Panther
I don't recommend Slash at all, and besides I don't know the link.
smile

Slash is good (it is based on BYOB and has tons of new blocks) but it's so tacky! Your mod is REALLY good when it comes to graphics and such. I have it, but I'm not completely sure if it supports cloning .

Offline

 

Board footer