Create Object: Difference between revisions

From Fancade Wiki
(Created page with "Creates a copy of the input object. /uploads/Create Object.png Input: * Original: The object to be copied. Output: * Copy: Returns the copy of the object. However this does not copy the scripts inside a block, only the _shell_ of the block. == Notes == Create Object, when inputted None, uses the last object created on this script. Making *too* many objects will affect performance negatively, so clone responsibly. There's also a limit of 4096 cr...")
 
m (Add related section and image)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Block
|image=Create Object.png
|type=s
|folder=objects
|input1={{Port|e|Before}}
|input2={{Port|o|Original}}
|output1={{Port|o|Copy}}
|output2={{Port|e|After}}
}}
Creates a copy of the input object.
Creates a copy of the input object.


[[width=336px|/uploads/Create Object.png]]
Does not copy the scripts inside a block, only the ''shell'' of the block.
 
Input:
 
* Original: The object to be copied.
 
Output:
 
* Copy: Returns the copy of the object.
 
However this does not copy the scripts inside a block, only the _shell_ of the block.


== Notes ==
== Notes ==


Create Object, when inputted None, uses the last object created on this script.
* If the input is None, the output will be the last object created by this script (But not a copy of said object!).
 
* There is a limit of 4096 objects. Attempting to create more objects when the limit has been reached will display a "Too many objects" error:
Making *too* many objects will affect performance negatively, so clone responsibly.  
: [[File:Error Too many objects.png|frameless|center]]
* Creating objects has a large effect on performance, try to reuse already created objects when possible.


There's also a limit of 4096 created objects, so if you try to create more than that you will get a "Too many objects" error message.
== Related ==


* [[Destroy Object]]


[[Category:Blocks]]
[[Category:Blocks]]

Latest revision as of 13:42, 29 July 2025

Create Object
Create Object.png
TypeScript block
ColliderNone
FolderObjects
Ports
Inputs Before
Original
Outputs Copy
After

Creates a copy of the input object.

Does not copy the scripts inside a block, only the shell of the block.

Notes

  • If the input is None, the output will be the last object created by this script (But not a copy of said object!).
  • There is a limit of 4096 objects. Attempting to create more objects when the limit has been reached will display a "Too many objects" error:
File:Error Too many objects.png
  • Creating objects has a large effect on performance, try to reuse already created objects when possible.

Related