Copyright: Made with Shalom Help Maker www.danish-shareware.dk/soft/shelpm/


Introduction

Features:
- OpenGL accelerated 3D graphics
- animated Quake 2 md2 and Quake 3 md3 3D models
- static 3D Studio 3ds, Milkshape ms3d and Wavefront obj 3D models
- many built in 3D objects like cube, sphere, torus, cone, ...
- Sprites
- Billboards
- 2 dimensional and 3 dimensional text
- Lensflares
- Particle effects
- Fog
- Lights

Credits

all GLScene programmers
Freegadgets, who helped me with mathematics, testing and
gave me the idea to use the Game Maker room editor as world editor


Installation

Installation is simple. All you need in order to  use the engine are the dll and the scripts.
Either you put the dll in the directory of your game or in a directory where Windows searches for dlls, for example in the System directory of your Windows directory.
If you distribute a game that uses the engine you also have to distribute the dll.


License Agreement

Xtreme 3D
Copyright 2002-2003
Xception
All rights reserved.

THIS AGREEMENT EXPRESSES THE TERMS AND CONDITIONS
ON WHICH YOU MAY USE THIS SOFTWARE PROGRAM AND
ACCOMPANYING FILES THAT THE AUTHOR IS FURNISHING
OR MAKING AVAILABLE TO YOU WITH THIS AGREEMENT
(COLLECTIVELY, THE "SOFTWARE").

READ THE TERMS AND CONDITIONS OF THIS LICENSE
AGREEMENT CAREFULLY BEFORE INSTALLING OR
USING THE SOFTWARE.

BY INSTALLING, COPYING OR OTHERWISE USING THE
SOFTWARE, YOU AND YOUR COMPANY (COLLECTIVELY, "YOU")
ARE ACCEPTING AND AGREEING TO THE TERMS OF THIS
LICENSE AGREEMENT. IF YOU OR YOUR COMPANY ARE
NOT WILLING TO BE BOUND BY THIS AGREEMENT,
DO NOT INSTALL OR USE THE SOFTWARE.

VARIOUS COPYRIGHTS AND OTHER INTELLECTUAL PROPERTY
RIGHTS PROTECT THE SOFTWARE. THIS AGREEMENT IS
A LICENSE AGREEMENT THAT GIVES YOU LIMITED
RIGHTS TO USE THE SOFTWARE AND NOT AN AGREEMENT
FOR SALE OR FOR TRANSFER OF TITLE. AUTHOR RESERVES
ALL RIGHTS NOT EXPRESSLY GRANTED BY THIS AGREEMENT.

This software is provided 'as-is', without any expressed or implied warranty.
In no event will the author be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose.
No licence fee is required.

You have add the following information to the documentation of your software
or to the software itself :
 - name of the engine:	Xtreme 3D
 - author of the engine:	Xception
 - author's homepage:
name: Xception - Gamedesign & more
url: http://home.tiscalinet.de/xception

This license does not apply to the graphics,
3D models, or sounds provided. These are
not part of the program, but were taken
from freeware collection and were provided
for your convenience.


Engine


dll_initialize

dll_initialize();
Defines all dll functions and some global variables.
It must be executed before any dll functions are used.
You should use this function only once in your program or you waste memory.


engine_start

engine_start(x,y,width,height);

Opens the rendering window and starts the engine.

arguments:
x, y: relative position of the engine's window in the GM window.
width, height: size of the engine's window.

examples:
Let's assume that the GM window is 640x480:
engine_start(0,0,640,480); 	// creates a window covering the whole GM window
engine_start(0,40,640,440); 	// 40 pixels of the GM window are visible at the top


engine_end

engine_end();

Stops the 3D Engine. Should be used at the end of the program.
Closes the OpenGL window and frees the memory used by the engine(textures, 3D objects,...).
Don't use any of the engine's functions except for engine_start() after you called this function.


render

render();

Renders the scene.
Should be placed in the step event of an object which always exists, for example the camera object, so that the scene is rendered each step.


rendertofile

rendertofile(filename);

Renders the scene and saves it as a bmp file.

argument:
filename: filename as string


engine_getpixelcolor

color=engine_getpixelcolor(x, y);

Returns color of pixel at position x, y

arguments:
x, y: pixel position


engine_lighting

engine_lighting(lighting);

Toggle to enable or disable lighting calculations.
When lighting is enabled, objects will be lit according to lightsources,
when lighting is disabled, objects are rendered in their own colors, without any shading.

Lighting does NOT generate shadows in OpenGL.

arguments:
lighting: true or false


engine_resize

engine_resize(x, y, width, height);

Resizes the engine's window.

arguments:
x, y: position in GM window
width, height: size of engine window


engine_visible

engine_visible(visible);

Show or hide engine.

arguments:
visible: true for visible, false for invisible


background_color

background_color(color);

Changes the background_color of the OpenGL window.

arguments:
color: use GM color constants or GM make_color function

examples:
background_color(c_red); 	// red background
background_color(make_color(255,255,255)); // white background;


Sprites


sprite_setsize

sprite_setsize(sprite,width,height);
Changes the width and height of a sprite.
arguments:
sprite is the handle received by sprite_create function
width is the new width, height is the new height of the sprite


sprite_scale

sprite_scale(sprite,x,y);
Scales a sprite horizontally and vertically.The difference between sprite_setsize and sprite_scale is that you define the size of the sprite directly with sprite_setsize, with sprite_scale you add/subtract x and y to/from size.
arguments:
sprite is the handle received by sprite_create function
if x is greater than 0 it adds x to the sprite width, if it is smaller than 0 it subtracts x from sprite width, if x=0 nothing happens
y is used like x but for sprite height


sprite_setrotation

sprite_setrotation(sprite,angle);

This function sets the rotation of a sprite.

arguments:
sprite is the sprite handle received by sprite_create function.
angle is an angle in degrees.


sprite_rotate

sprite_rotate(sprite,angle);

Rotates a sprite. angle is added/subtracted to/from the rotation angle of the sprite.

arguments:
sprite is the sprite handle received by sprite_create function.
angle is an angle in degrees, a positive value rotates the sprite clockwise, a negative value rotates it counterclockwise


sprite_move

sprite_move(sprite,x,y);

This function moves a sprite.

arguments:
sprite is the sprite handle received by sprite_create function.
x,y are the horizontal, vertical movement of the sprite in pixels.


Actors

Actors are animated md2 models.
MD2 is the file format of Quake2. To create or edit md2 models you can use Q2 Modeler (free), MED(comes with 3D Game Studio) or Milkshape (shareware). That are all md2 editors I know. However these editors have the ability to import 3ds files so you can make animation frames with your favorite 3D modeler and import these in the programs.


actor_animationmode

actor_animationmode(actor,mode);

Sets animation mode to none, play once, loop, bounce forward or bounce backward.

arguments:
actor: handle of an actor
mode:
0 = no animation
1 = play once
2 = loop (default)
3 = bounce forward
4 = bounce backward


actor_interval

actor_interval(actor,ms);

Interval between animation frames, in milliseconds.

arguments:
actor: handle of an actor
ms: interval in milliseconds as integer


actor_synchronize

actor_synchronize(actor1, actor2);

Synchronize animation of actors.

arguments:
actor1: handle of an actor; this actor will be synchronized with actor2
actor2: handle of an actor


actor_switchtoanimation

actor_switchtoanimation(actor,index);

Switch actor animation.

arguments:
actor: handle of an actor
index is the new animation index as integer


actor_setanimationrange

actor_setanimationrange(actor,start,end);

The default animation range are all frames. If you used actor_animate without defining an animation range the actor would run through all animations(standing, running,...). That's probably not what you want. With this function you can set an animation range. The animation runs then only from your specified start to end.

arguments:
actor: handle of an actor
start is the start frame, end is the end frame


actor_frame

frame=actor_frame(actor);

This function returns the current animation frame.

argument:
actor: handle of an actor


Camera

Functions


camera_backward

camera_backward(camera, speed);

This function moves the camera backward without going through solid objects.

argument:
camera: global.cam for standard camera or camera handle received by object_create(global.cam);
speed: speed in pixels.


camera_virtualup

camera_virtualup(up, x, y, z);

Enables or disables Virtual Up vector and sets its direction.
Enable Virtual Up vector for games like Doom, disable it for games like flightsimulators
Default is enabled and pointing up.

arguments:

up: true if camera should use virtual up vector, false if not
x, y, z: Virtual Up Vector


camera_distance2target

result=camera_distance2target();

Returns the distance between the camera and the camera's target object.


camera_forward

camera_forward(camera, speed);

This function moves the camera forward without going through solid objects.

argument:
camera: global.cam for standard camera or camera handle received by object_create(global.cam);
speed: the speed in pixels.


camera_jump

camera_jump(camera);

Place the function in the step event of your camera object.
If variable jump is set to 1 the camera jumps and lands automatically and sets jump to 0 after camera landed.

arguments:
camera: global.cam for standard camera or camera handle received by object_create(global.cam);


camera_movearoundtarget

camera_movearoundtarget(pitch, turn);

Moves camera around target object, always facing the target.

arguments:
pitch: pitch as real
turn: turn as real


camera_pitch

camera_pitch(angle);

Sets the camera's pitch angle.

arguments:
pitch: pitch as real


camera_lockangles

camera_lockangles(locked, min, max)

Locks or unlocks the camera's rotation angles.
Useful for first person shooters and mouselook.

arguments:
locked: true or false
min: minimum angle as real
max: maximum angle as real


camera_roll

camera_roll(angle);

Sets the camera's roll angle.

arguments:
angle: roll angle as real


camera_move

camera_move(speed);

Moves the camera in direction it's facing.

arguments:
speed: speed in pixels


camera_scenescale

camera_scenescale(factor);

Zooms the 3D scene in or out. With this function you can for example make a sniper mode.

argument:
factor is added/subtracted to/from the current scene scale.


camera_setdistance2target

camera_setdistance2target(distance);

Sets the camera's distance to its target object.
Target object should be set with camera_settargetobject

arguments:
distance: distance as real


camera_setfocal

camera_setfocal((focallength);

Adjusting focallength allows for lens zooming effects.
The default focal length is 50.
It's best to try it out to see the effect.

arguments:
focallength: focallength as real


camera_setscenescale

camera_setscenescale(scale);

This is a linear 2D scaling of the camera's output, allows for linear zooming.
Use FocalLength for lens zooming.

arguments:
scale: scale as real


camera_settargetobject

camera_settargetobject(object);

If a target object is set, the camera will point to this object.

arguments:
object: handle of an object


camera_setviewdepth

camera_setviewdepth(depth);

Sets the viewdepth of a camera.

arguments:
depth: depth as real


camera_turn

camera_turn(angle);

Sets the turn angle of a camera.

arguments:
angle: turn angle as real


Fog


fog_switch

fog_switch();

If fog is off then fog is turned on, if fog is on then fog is turned off. Fog is off by default. Therefore the first time you call this function fog is turned on.

example:
fog_color(255,255,255);


fog_distance

fog_distance(start,end);

This function defines start and end of fog.

arguments:
start: everything that lies before start is not affected by fog
end: everything after end is not visible, lies in total fog


fog_color

fog_color(color);

This function sets the color of the fog when it is at 100% intensity.

arguments:
color: use GM color constants or GM make_color function


Lights

You should place at least one light in your room or it will be dark.
The OpenGL standard only supports 8 lights in a 3D scene. Some graphics cards could support more lights in an OpenGL scene. However if more than 8 lights work on your graphics card and you use more than 8 lights, your program could crash or become very slow on other computer systems. Therefore you shouldn't create more than 8 lights in your scene. The more lights the slower the rendering will be, especially on slower computer systems.


light_style

light_style(light,style);

With this function you can set the light style of a lightsource.

arguments:
light: handle of a light object
style:
1: omnidirectional light
2: parallel light
3: spotlight


light_shining

light_shining(light,shining);

Turns a light on or off.

arguments:
light: handle of a light object
shining: true: light is shining - false:light is not shining


light_ambient

light_ambient(light,color);

This function sets the light's ambient color.

arguments:
light: handle of a light object
color: use GM color constants or GM make_color function


light_diffuse

light_diffuse(light,color);

This function sets the light's diffuse color.

arguments:
light: handle of a light object
color: use GM color constants or GM make_color function


light_specular

light_specular(light,color);

This function sets the light's specular color.

arguments:
light: handle of a light object
color: use GM color constants or GM make_color function


light_attenuation

light_attenuation(light, const, linear, quadratic);

The text for this function has been generated automatically.
This means that it is not documented.

arguments:
light: handle of a light object
const, linear, quadratic attenuation as real


light_spotcutoff

light_spotcutoff(light,cutoff);

The text for this function has been generated automatically.
This means that it is not documented.

arguments:
light: handle of a light object
cutoff: spotcutoff as real


light_spotexponent

light_spotexponent(light,exponent);

The text for this function has been generated automatically.
This means that it is not documented.

arguments:
light: handle of a light object
exponent: spotexponent as real


light_spotdirection

light_spotdirection(light, x, y, z);

Sets the spot direction of a spotlight.

arguments:
light: handle of a light object
x, y, z: direction as real


Mouse

In most professional 3D games you can use the mouse to look around. And you can do it, too.


mouselook_activate

mouselook_activate()

Activates mouselook, that means you can look up, down, left and right with the mouse. By default mouselook is deactivated.


mouselook_deactivate

mouselook_deactivate();
Deactivates mouselook, you can't look with the mouse any more until you use mouselook_activate function.


mouselook_inverse

mouselook_invert();
Normally when mouselook is activated and you move your mouse up then you look up. With this function you can change this. The function always inverts the current state.


mouselook_speed

mouselook_speed(speed);

Sets the speed/sensitivity of the mouse.

argument:
if speed=0 you can't look with mouse. Good values for speed are between 5 and 20.


Objects


object_create

handle=object_create(objecttype);

With this function you are able to create various 3D objects. The function returns an object handle that you have to store in a variable because this handle is needed in all other object functions.

arguments:
handle: you should replace handle with the variable you want to store the objects handle; with the object handle your object is identified and it is needed in all other object functions. Therefore you must use a different variable for each object.
objecttype: Replace this with one of the following variables
global.annulus
global.cone
global.cube
global.cylinder
global.disk
global.frustrum
global.grid
global.line
global.polygon
global.sphere
global.sprite2d
global.sprite3d
global.text3d
global.torus
global.terrain


object_duplicate

handle=object_duplicate(object);

Duplicates an object and returns the handle of the new object.
A duplicated object uses the same resources as the master object.
Thus duplicating objects saves you resources and you can get more fps.
You should however test if duplicating or creating gives you more fps;
In my tests duplicating actors instead of creating each one gave me a huge speed increase,
duplicating cubes however led to the opposite.

argument:
object: object handle of object which should be duplicated


object_delete

object_delete(object);

If you don't need the object anymore then it's time to destroy it with this function. This function frees memory used by the object. After you destroyed the object you can't use the object handle any longer.

arguments:
object is the object handle received by object_create function.


object_hide

object_hide(object);

This function hides an object, it makes the object invisible.

argument:
object is the object handle received by object_create function.


object_show

object_show(object);
Shows an object that was made invisible with the object_hide function
arguments:
object is the object handle returned by the object_create function


object_setposition

object_setposition(object,x,y,z);

Sets the position of an object.

arguments:
object: object handle
x,y,z: x, y, z position as real


object_getposition_x

result=object_getposition_x(object);

Returns the x position of an object.

argument:
object: object handle


object_getposition_y

result=object_getposition_y(object);

Returns the y position of an object.

argument:
object: object handle


object_getposition_z

result=object_getposition_z(object);

Returns the z position of an object.

argument:
object: object handle


object_setscale

object_setscale(object,x,y,z);

Sets the scale of an object.

arguments:
object: object handle
x,y,z: x, y, z scale as real


object_scale

object_scale(object,x,y,z);

This function scales the object, that means x is added to the width, y is added to the height and z is added to the depth of the object.
If you use negative values then it will be subtracted.


object_setrotation

object_setrotation(object, x, y, z);

Sets the rotation of an object.

arguments:
object: object handle
x,y,z: x, y, z rotation as real


object_rotate

object_rotate(object,pitch,turn,roll);

Rotates an object.

arguments:
object: object handle
pitch: pitch as real
turn: turn as real
roll: roll as real


object_turn

object_turn(object,angle);

Turns the object.

arguments:
object: object handle
angle: turn angle as real


object_pitch

object_pitch(object,angle);

Changes object's pitch angle.

arguments:
object: object handle
angle: pitch angle as real is added to the current angle and wrapped if neccessary


object_roll

object_roll(object,angle);

Rolls an object.

arguments:
object: object handle
angle: angle as real is added to the current angle and wrapped if neccessary


object_move

object_move(object,speed);

This function moves an object in the direction it's facing.

arguments:
object is the object handle received by object_create function.
speed is the movement in pixels.


object_strafe

object_strafe(object,speed);


object_lift

object_lift(object,speed);

Moves object upwards.

arguments:
object:object handle
speed:speed in pixels


object_setdirection

object_setdirection(object,x,y,z);

Sets the direction of an object.

arguments:
object: object handle
x,y,z: x, y, z direction as real


object_direction_x

result=object_direction_x(object);

Returns x direction of an object.

arguments:

object: handle of an object


object_direction_y

result=object_direction_y(object);

Returns y direction of an object.

arguments:

object: handle of an object


object_direction_z

result=object_direction_z(object);

Returns z direction of an object.

arguments:

object: handle of an object


object_setmaterial

object_setmaterial(object,material);

This function assigns a material to an object.

arguments:
object is the object handle received by object_create function.
material is the material name you gave the material with the material_createfunction.


object_setcolor

object_setcolor(object,r,g,b);

This function sets the color of an object. The color is only visible if the object is not textured.

arguments:
object is the object handle received by object_create function.
r,g,b is the color in RGB format


object_distance

result=object_distance(object1,object2);

The function returns the distance between two objects.

arguments:
object1, object2 are object handles received by object_create function.


object_setupvector

object_setupvector(object,x,y,z);

Sets the up vector of an object.

arguments:
object: object handle
x,y,z: x, y, z up vector as real


object_point2object

object_point2object(object1, object2);

Orients object1 towards object2.

arguments:
object1: handle of an object
object2: handle of an object


object_collision

collision=object_collision(object1, object2);

With this function you can find out if a collision between two objects occured.

arguments:
object1, object2 are object handles received by object_create function:
The function returns 1 if a collision was detected and 0 if not.


object_raycast

object_raycast(


object_culling

object_culling(object, mode);

Changes Visibility Culling of an object.

arguments:
object: handle of an object
mode:
0: no culling is performed
1: object based culling is performed
2: hierarchical culling is performed


object_isatxy

result=object_isatxy(object, x, y);

Returns true if object is at screen position x, y

arguments:
object: handle of an object
x, y: position on the render window


object_atxy

object=object_atxy(x, y);

Returns the object handle of the nearest object at screen position x, y
or -1 if no object is at this position.

arguments:
x, y: position on the render window


frustrum_shape

frustrum_shape(frustrum, width, depth, height);

Changes the shape of a frustrum object.

arguments:
frustrum: handle of a frustrum object
width: base width as real
depth: base depth as real
height: height as real


torus_rings

torus_rings(torus, rings);

Sets the number of rings of a torus.

arguments:
torus: handle of a torus object
rings: number of rings as integer


torus_radius

torus_radius(torus, minor, major);

Sets the minor and major radius of a torus.

arguments:
torus: handle of a torus object
minor: minor radius as real
major: major radius as real


sphere_stacks

sphere_stacks(sphere, stacks);

Sets the number of stacks of a sphere.

arguments:
sphere: handle of a sphere object
stacks: number of stacks as integer


sphere_slices

sphere_slices(sphere, slices);

Sets the number of slices of a sphere.

arguments:
sphere: handle of a sphere object
slices: number of stacks as integer


Polygons

A polygon needs at least 3 points(vertices) to be visible. With the polygon functions you are able to add and delete vertices.


polygon_addvertex

polygon_addvertex(polygon,x,y,z);
Adds a vertex to a polygon.
arguments:
polygon is the handle you get with the object_create function
x,y,z are the vertex coordinates
example:
look at polygon_deletevertex for an example


polygon_deletevertex

polygon_deletevertex(polygon,vertex);
Deletes a vertex in a polygon. The vertex must exist or the program crashes.
arguments:
polygon is the handle you get with the object_create function
vetex is the vertex number
example:
poly=object_create(global.polygon); // creates an empty polygon
polygon_addvertex(poly,0,0,0); // adds
polygon_addvertex(poly,2,0,0); // 4 vertices
polygon_addvertex(poly,2,2,0); // to form
polygon_addvertex(poly,0,2,0); // a rectangular polygon
polygon_deletevertex(poly,3); // deletes the last vertex, now we have a triangular polygon


polygon_vertexposition

polygon_vertexposition(polygon, vertex, x, y, z);

Sets the position of a polygon's vertex.

arguments:
polygon: handle of a polygon object
vertex: vertex of polygon; first vertex you add has value 0
x,y,z: vertex position


polygon_getvertexpos_x

result=polygon_getvertexpos_x(polygon, vertex);

Returns x position of a polygon's vertex.

arguments:
polygon: handle of a polygon object
vertex: vertex of polygon; first vertex you add has value 0


polygon_getvertexpos_y

result=polygon_getvertexpos_y(polygon, vertex);

Returns y position of a polygon's vertex.

arguments:
polygon: handle of a polygon object
vertex: vertex of polygon; first vertex you add has value 0


polygon_getvertexpos_z

result=polygon_getvertexpos_z(polygon, vertex);

Returns z position of a polygon's vertex.

arguments:
polygon: handle of a polygon object
vertex: vertex of polygon; first vertex you add has value 0


Materials/Textures

Texture formats:
bmp, jpg, tga,


material_create

material_create(name, filename, mode);

Creates a material.

arguments:
name: a name you give the material, it's needed in all other material functions
filename: a name of a texture file, or an empty string for no texture
mode:
0: opaque texture
1: transparent texture; top left pixel defines transparency


material_loadtexture

material_loadtexture(material, image);

Loads a texture into a material,
if a texture was assigned to the material before, the old texture is discarded.

arguments:
material: material name as string, received by texture_create
image: image filename as string


material_blendingmode

material_blendingmode(material, mode)

Blending mode of a material.

arguments:
material: material name as string
mode: 1=opaque , 2=transparency , 3=additive


material_ambient

material_ambient(material, color, alpha);

Sets the material's ambient color.

arguments:
material: material name as string
color: use GM color constants or GM make_color function
alpha: alpha as real


material_diffuse

material_diffuse(material, color, alpha);

Sets the material's diffuse color.

arguments:
material: material name as string
color: use GM color constants or GM make_color function
alpha: alpha as real


material_emission

material_emission(material, color, alpha);

Sets the material's emission color.

arguments:
material: material name as string
color: use GM color constants or GM make_color function
alpha: alpha as real


material_specular

material_specular(material, color, alpha);

Sets the material's specular color.

arguments:
material: material name as string
color: use GM color constants or GM make_color function
alpha: alpha as real


material_shininess

material_shininess(material, shininess);

Sets a material's shininess.

arguments:
material: material name as string
shininess: number from 0 to 128


texture_enabled

texture_enabled(material, enabled);

Enables or disables a material's texture.

arguments:
material: material name as string
enabled: true or false


texture_mode

texture_mode(material, mode);

Sets texture mode of a material.

arguments:
material: material name as string
mode: 1=decal , 2=modulate , 3=blend , 4=replace


texture_filter

texture_filter(texture, min, max);

Sets filter mode of a texture.

arguments:
texture: texture name as string, received by texture_create
min:
1=Nearest , 2=Linear , 3=NearestMipmapNearest , 4=LinearMipmapNearest , 5=NearestMipmapLinear , 6=LinearMipmapLinear
max:
1=Nearest , 2=Linear


texture_offset

texture_offset(material,x,y);

With this function you can move a texture horizontally and vertically.

arguments:
material: material name as string
x,y: offset as real
x and y should be in the range of 0 to 1.
0 and 1 means the same, no offset, therefore you have to use a number between 0 and 1 if you want to change the offset.


texture_scale

texture_scale(material, x, y);

The function scales a material's texture horizontally and vertically.
If x/y is 1 then the texture isn't scaled.
If x/y is smaller than 1 then the texture is scaled down, if x/y is greater than 1 then the texture is scaled up.
Maybe scaling is not the correct definition because the texture is not really scaled, it is tiled.

arguments:
material: material name as string
x defines the horizontal size,
y defines the vertical size


font_create

font=font_create(font, size);

Creates a font.

arguments:
font: font name as string, for example "Times New Roman"
size: font size as integer


text_color

text_color(text, color, alpha);

Changes text color.

arguments:
text: handle of a text object
color: use GM color constants or GM make_color function
alpha: alpha as real


text_text

text_text(text, string)

Changes the text of a text object.

arguments:
text: handle of a text object
string: new text as string


text_rotation

text_rotation(text, angle);

Rotates the text.

arguments:
text: handle of a text object
angle: rotation angle as integer


3D Text

3D Text is what the name says. You can use all object functions with 3D Text and special functions to specify the text and the extrusion.


text3d_text

text3d_text(texthandle,text);

Changes the text of the the 3D text object.
After creating 3D text it has an empty string as text.
You should use this function to give a text to the 3D text object or to change the existing text.

arguments:
texthandle: handle received by object_create function.
text: text as string

example:
hello=object_create(global.text3d); // creates 3D text
text3d_text(hello,'Hello World');	// 3d text shows the string 'Hello World'
text3d_extrusion(hello,0.2);	// reduces the depth of the 3D text


text3d_extrusion

text3d_extrusion(text,extrusion);

Sets the extrusion of the text.

arguments:
text: handle received by object_create function.
extrusion: extrusion(depth) of the text as real


fxtype_create

handle=fxtype_create(fx);

Creates a controller for a fire or thor fx and returns its handle.
A firefx needs a firefx controller, a thorfx a thorfx controller.
Don't try to assign the wrong controller to an effect.
The controller controls the behaviour of an effect.
If you assign the same controller to different effects then they all look the same.
If you want different looking effects then you have to create more controllers.

arguments:
fx: 1 for firefx, 2 for thorfx


firefx_create

handle=firefx_create(controller, parent);

Creates a Fire FX and returns its handle.

arguments:
controller: handle received by fxtype_create
parent: handle of an object in order to create firefx as child of an object or -1


firefx_color

firefx_color(controller, innercolor, inneralpha, outercolor, outeralpha);

Sets FireFX color.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
innercolor, outercolor: use GM color constants or GM make_color function
inneralpha, outeralpha: alpha as real


firefx_radius

result=firefx_radius(controller, radius);

Sets or returns radius.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
radius: radius  as real or -1 to get radius


firefx_burst

result=firefx_burst(controller, burst);

Sets or returns burst.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
burst: burst as real or -1 to get burst


firefx_life

result=firefx_life(controller, life);

Sets or returns life.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
life: life of particles as real or -1 to get life


firefx_crown

result=firefx_crown(controller, size);

Sets or returns crown.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
size: size as real or -1 to get size


firefx_evaporation

result=firefx_evaporation(controller, ev);

Sets or returns evaporation.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
ev: evaporation of particles as real or -1 to get evaporation


firefx_density

result=firefx_density(controller, density);

Sets or returns density.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
density: density of particles as real or -1 to get size


firefx_particlesize

result=firefx_particlesize(controller, size);

Sets or returns particle size.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
size: size of particles as real or -1 to get size


firefx_maxparticles

result=firefx_maxparticles(controller, max);

Sets or returns maximum number of particles.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
max: maximum number of particles as integer or -1 to get maximum number


firefx_dir_x

result=firefx_dir_x(controller, dir);

Sets or returns x direction.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
dir: direction as real or -1 to get direction


firefx_dir_y

result=firefx_dir_y(controller, dir);

Sets or returns y direction.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
dir: direction as real or -1 to get direction


firefx_dir_z

result=firefx_dir_z(controller, dir);

Sets or returns z direction.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
dir: direction as real or -1 to get direction


thorfx_create

handle=thorfx_create(controller, parent);

Creates a Thor FX and returns its handle.

arguments:
controller: handle received by fxtype_create
parent: handle of an object in order to create thorfx as child of an object or -1


thorfx_glow

thorfx_glow(controller, enabled);

Sets glow to enabled or disabled.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
enabled: true or false


thorfx_core

thorfx_core(controller, enabled);

Sets core to enabled or disabled.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
enabled: true or false


thorfx_target_x

result=thorfx_target_x(controller, dir);

Sets or returns target x direction.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
dir: direction as real or -1 to get direction


thorfx_target_y

result=thorfx_target_y(controller, dir);

Sets or returns target y direction.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
dir: direction as real or -1 to get direction


thorfx_target_z

result=thorfx_target_z(controller, dir);

Sets or returns target z direction.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
dir: direction as real or -1 to get direction


thorfx_wildness

result=thorfx_wildness(controller, wildness);

Sets or returns wildness.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
wildness: wildness as real or -1 to get wildness


thorfx_vibrate

result=thorfx_vibrate(controller, vibration);

Sets or returns vibration.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
vibration: vibration as real or -1 to get vibration


thorfx_glowsize

result=thorfx_glowsize(controller, size);

Sets or returns glow size.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
size: glow size as real or -1 to get size


thorfx_maxparticles

result=thorfx_maxparticles(controller, max);

Sets or returns maximum number of particles.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
max: maximum number of particles as integer or -1 to get maximum number


thorfx_color

thorfx_color(controller, innercolor, inneralpha, outercolor, outeralpha, corecolor, corealpha);

Sets ThorFX color.

arguments:
controller: handle of a fxtype controller, received by fxtype_create
innercolor, outercolor, corecolor: use GM color constants or GM make_color function
inneralpha, outeralpha, corealpha: alpha as real


lensflare_elements

lensflare_elements(lensflare, glow, ring, streaks, rays, secondaries);

Sets elements of a lensflare to visible or invisible.

arguments:
lensflare: handle to a lensflare
others: true for visible, false for invisible


lensflare_size

result=lensflare_size(lensflare, size);

Sets or returns the size of a lensflare.

arguments:
lensflare: handle to a lensflare
size: size as integer or -1 to get the size


lensflare_seed

result=lensflare_seed(lensflare, seed);

Sets or returns the lensflare seed.

arguments:
lensflare: handle to a lensflare
seed: seed as integer or -1 to get the seed


lensflare_squeeze

result=lensflare_squeeze(lensflare, squeeze);

Sets or returns the lensflare squeeze.

arguments:
lensflare: handle to a lensflare
squeeze: squeeze as real or -1 to get squeeze


lensflare_streaks

result=lensflare_streaks(lensflare, streaks);

Sets or returns the number of streaks.

arguments:
lensflare: handle to a lensflare
streaks: number of streaks as integer or -1 to get the number


lensflare_streakwidth

result=lensflare_streakwidth(lensflare, width);

Sets or returns the lensflare streak width.

arguments:
lensflare: handle to a lensflare
width: streak width as integer or -1 to get the width


lensflare_secs

result=lensflare_secs(lensflare,secs);

Sets or returns the number of secondary flares.

arguments:
lensflare: handle to a lensflare
secs: number of secondary flares as integer or -1 to get the number


lensflare_resolution

result=lensflare_resolution(lensflare, resolution);

Sets or returns the lensflare resolution.

arguments:
lensflare: handle of a lensflare
resolution: resolution as integer or -1 to get the resolution


lensflare_color

lensflare_color(lensflare, part, r1, g1, b1, a1, r2, g2, b2, a2);

Sets the gradient color of a lensflare part.

arguments:
lensflare: handle of a lensflare
part: 1=glow, 2=ring, 3=streaks, 4=rays, 5=secondaries
r1, g1, b1, a1: start color as real
r2, g2, b2, a2: end color as real