4.9.9 Create functions

Create functions let you create objects for your scene as long as there is not already an object with the same name in your project. They are different to other functions since they usually do only get executed once in a project and this usually on the first frame. Create functions use some common object attributes as arguments. Further object definitions are done using the channels of the created objects. To setup and define object attributes it is recommended that you use the setup function. Read how to use create functions here.

effector: cross

create_cross( "name", "parent", position, rotation ) // creates a cross effector

Example:
// creating a cross effector as a child of the object "Cube" with the name "Cubes_child"
create_cross( "Cubes_child", "Cube", vec( 0, 0, 0 ), vec( 0, 0, 0 ) );


effector: box

create_box( "name", "parent", position, rotation, boxsize ) // creates a box effector

Example:
// creating a box effector as a child of the object "Cube" with the name "Box_Effector"
create_box( "Box_Effector", "Cube", vec( 0, 0, 0 ), vec( 0, 0, 0 ), vec( 10, 10, 10 ) );


effector: joint

create_joint( "name", "parent", position, rotation, size ) // creates a joint effector

Example:
// creating a joint effector as a child of the object "Cube" with the name "Joint_Effector" and a size of 10
create_joint( "Joint_Effector", "Cube", vec( 0, 0, 0 ), vec( 0, 0, 0 ), 10 );


effector: bone

create_bone( "name", "parent", position, rotation, length ) // creates a bone effector

Example:
// creating a bone effector as a child of the object "Cube" with the name "Cube_Bone" and a length of 10
create_bone( "Cubes_Bone", "Cube", vec( 0, 0, 0 ), vec( 0, 0, 0 ), 10 );


camera

create_camera( "name", "parent", position, reference ) // creates a camera

Example:
// creating a camera object at the root level of the project with the name "My_Camera"
create_camera( "My_Camera", "", vec( 0, 0, -100 ), vec( 0, 0, 0 ) );


light: camera

create_cameralight( "name", "parent", position, reference) // creates a camera light

Example:
// creating a camera light as a child of the object "Camera_1" with the name "Camera_Light"
create_cameralight( "Camera_Light", "Camera_1", vec( 0, 0, 0 ), vec( 0, 0, 0 ) );


light: parallel

create_parallellight( "name", "parent", position, reference ) // creates a parallel light

Example:
// creating a parallel light at the root level of the project with the name "Sun"
create_parallellight( "Sun", "", vec( -1000, 1000, -1000 ), vec( 0, 0, 0 ) );


light: radial

create_cross( "name", "parent", position ) // creates a radial light

Example:
// creating a radial light at the root level of the project with the name "Lamp"
create_radiallight( "lamp", "", vec( 10, 10, 10 ), vec( 0, 0, 0 ) );


light: ambient

create_ambientlight( "name", "parent", position ) // creates an ambient light

Example:
// creating aa ambient light at the root level of the project with the name "Ambient"
create_ambientlight( "Ambient", "", vec( 0, 0, 0 ) );


light: spot

create_spotlight( "name", "parent", position, reference ) // creates a spot light

Example:
// creating a spot light as a child of the object "Bulb_Object" with the name "Bulb_Light"
create_spotlight( "Bulb_Light", "Bulb_Object", vec( 0, 0, 0 ), vec( 0, 0, 0 ) );


light: tube

create_tubelight( "name", "parent", position, reference ) // creates a tube light

Example:
// creating a tube light as a child of the object "Cube" with the name "Custom_Tube"
create_tubelight( "Custom_Tube", "Cube", vec( 0, 0, -10 ), vec( 0, 0, 10 ) );


illuminator: radial dome

create_radialdomeilluminator( "name", "parent", position, rotation) // creates a box effector

Example:
// creating a dome illuminator wuth radial lights at the root level of the project with the name "Dome"
create_radialdomeilluminator( "Dome", "", vec( 0, 0, 0 ), vec( 0, 0, 0 );


illuminator: radial box

create_radialboxilluminator( "name", "parent", position, rotation) // creates a box effector

Example:
// creating a box illuminator with radial lights at the root level of the project with the name "Box_Illuminator"
create_radialboxilluminator( "Box_Illuminator", "", vec( 0, 0, 0 ), vec( 0, 0, 0 );


smoker

create_smoker( "name", "parent", position, rotation) // creates a smoker object

Example:
// creating a smoker object at the root level of the project with the name "Custom_Smoker"
create_smoker( "Custom_Smoker", "", vec( 0, 0, 0 ), vec( 0, 0, 0 );

 

 

Xpressionist 3.5