Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Knowledge Base
  3. 3D Blocks
  4. Copying Objects

Copying Objects

Scheduled Pinned Locked Moved 3D Blocks
1 Posts 1 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CreatiCodeI Offline
    CreatiCodeI Offline
    CreatiCode
    wrote on last edited by admin
    #1

    Prerequisite

    • Adding Models

     

    Introduction

    Sometimes we need to add multiple similar objects (shapes, avatars or models). For example, suppose we need to build a forest of many trees. If we add each tree as a new object, it will take a long time to add them, and the program will also run slower due to the increased memory usage.

    Instead, we can simply add one tree, then make many copies of it. This will make your program run faster.

     

    Block for Copying An Object

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/474ed942-cafe-4764-89fe-b49224ee87ff.png" width="500" style="">

    • Share Data: If “Yes”, then the copied object will share the same data as the original object, such as meshes (small faces that compose the object), materials (texture and color) and animation frames; If “No”, then the copied object will have its own materials and no animation.
    • New Object Name: The name of the copied object.

     

    Demo 1 - Many Copies That Look the Same

    In this example, we need to many trees that look the same, so we can create all of them with share data = Yes.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/2b266ca4-cb43-48c4-bc59-6fe1adc23c38.gif" width="500" style="border-radius: 5px; border: 1px solid #29622d;">

    Here is the program:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/94487322-08ce-4447-8b0e-adb6c31f64c4.png" width="800" style="filter: drop-shadow(0.35rem 0.35rem 0.4rem rgba(0, 0, 0, 0.5));">

    Note that right after we make a copy, this copied object becomes the newly selected sprite object. In this example, we are not making 100 copies of the first tree (named “tree 1”). Instead, the second tree is a copy of the first tree, and the third tree is a copy of the second tree, etc.

     

    Demo 2 - Many Copies with Different Colors

    In this example, we still want to copy the same gift box many times, but we want to update their materials to different colors. Therefore, we need to select share data = No when we make these copies.

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/ae172346-ccca-4211-a293-c387cdd15687.gif" width="500" style="border-radius: 5px; border: 1px solid #29622d;">

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/0d41b70a-eae0-4815-9b58-6340bd5e691d.png" width="1000" style="filter: drop-shadow(0.35rem 0.35rem 0.4rem rgba(0, 0, 0, 0.5));">

     

    Demo 3 - Many Copies of a Character That Run the Same Animation

    Suppose you want to have many pigs that run around in a scene. You can create them with sharing data, so they will all look the same, and run the same animation:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/0e913222-daeb-46eb-b823-1b531ec26b73.gif" width="500" style="border-radius: 5px; border: 1px solid #29622d;">

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/f355f3fb-1506-430d-8d14-bdac79fad3ce.png" width="1000" style="filter: drop-shadow(0.35rem 0.35rem 0.4rem rgba(0, 0, 0, 0.5));">

     

    Demo 4 - Unlinked Copies with Different Colors and Animations

    In this example, the elephant is copied as not sharing data from the original. As shown, they can have different colors and animations:

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/39532dbb-23ee-497d-9f18-5fb21d13f1bc.gif" width="500" style="border-radius: 5px; border: 1px solid #29622d;">

    https://cdncreaticodecom.b-cdn.net/scratch-gui-projects/forum/3a9036f3-143e-412b-b431-798d3b96f082.png" width="1000" style="filter: drop-shadow(0.35rem 0.35rem 0.4rem rgba(0, 0, 0, 0.5));">

    1 Reply Last reply
    0
    • CreatiCodeI CreatiCode pinned this topic on

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode