ObjectClone

Family: 3D · 2 forms

What it does

ObjectClone takes objectID (an integer), and answers an integer. That is the first of 2 forms. objectID is the id of a 3D object, the one LoadObject returned: it is how the call knows what to act on.

Syntax

1
ObjectClone(objectID integer) → integer
2
ObjectClone(newObjectID integer, objectID integer)

Parameters

NameTypeIn forms
objectIDintegerall
newObjectIDinteger2

What each form returns

1ObjectClone(object)integer
2ObjectClone(1, object)nothing

Example · generated

Form 1, the command hands back the id

object = LoadObject("assets/media.obj")DO  Print(ObjectClone(object))  Sync()LOOP

Form 2, you choose the id yourself

object = LoadObject("assets/media.obj")ObjectClone(1, object)DO  Sync()LOOP

LoadObject is there to give the call something to act on; ObjectClone is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

286 commands in 3D