QCake verwendet die Sprache QTScript von QT-Trolltech. Sie funktioniert unter Linux i386 und ppc, Mac-OSX und Windows.

Die Sprache ist auch unter JavaScript bekannt.

QCake js Globals:
-----------------

QCakeID   // the ID from this script file

QCake js-stdlib API:
-----------------

function Vector(x, y, z) // x,y,z Vector

Vector.prototype.add(a)
	
Vector.prototype.sub(a)


function QCO (id) // get Object reference of a QCake Object
	
QCO.prototype.getattr(args)

QCO.prototype.setattr(args)

QCO.prototype.getpos()

QCO.prototype.getrot()
	
QCO.prototype.setpos(v)
	
QCO.prototype.setrot(r)  // rotate relativ object axis

QCO.prototype.rotate(r)  // rotate global axis

QCO.prototype.move(v)    // move delta v

QCO.prototype.getpos_x() // position

QCO.prototype.getpos_y()

QCO.prototype.getpos_z()

QCO.prototype.getrot_h()

QCO.prototype.getrot_p()

QCO.prototype.getrot_r()

QCO.prototype.setsequence(s,m)  // s -> sequence, m -> mode

QCO.prototype.Ref()  // read the reference

QCake API:
----------

    int QCakeApi.getRef(int id); // get a reference of a 3D Object

    int QCakeApi.getParentID(int id); // get the Parent-ID of the Object id

    QCakeApi.setPosition (int objref, float x, float y, float z, float h, float p, float r); // Set the position and angle of a 3D Object

    float QCakeApi.getPositionX (int objref); // Get the position and angle of a 3D Object

    float QCakeApi.getPositionY (int objref); // Get the position and angle of a 3D Object

    float QCakeApi.getPositionZ (int objref); // Get the position and angle of a 3D Object

    float QCakeApi.getPositionH (int objref); // Get the position and angle of a 3D Object

    float QCakeApi.getPositionP (int objref); // Get the position and angle of a 3D Object

    float QCakeApi.getPositionR (int objref); // Get the position and angle of a 3D Object

    QCakeApi.Rotate (int objref, float h, float p, float r);  // Rotate relative Object Axis angel h,p,r

    string* QCakeApi.getAttribute(int objref, char *string); // get the attribut of the object(ref)

    QCakeApi.setAttribute(int objref, char *string, char *value); // set the attribute of the object(ref)

    int QCakeApi.getMouse(int achse); // get the X(0) or Y(1) Coordinate from the Mouse

    int QCakeApi.getMouseButton(); // get the Button value Bit0 = LelftButton Bit1 = MidButton Bit2 = RightButton

    int QCakeApi.getMouse(int achse); // get the X(0) or Y(1) Coordinate from the mouse pointers

    int QCakeApi.get3DMouse(int achse); // get the X(0) or Y(1) or Z(2 )Coordinate from the 3D-World behind the mouse pointers first 3D Object

    float QCakeApi.getJoystick(int js,int achse); // get the value from js 0,1 and the achse 0,1,2,3,4,5,6,7,8

    int QCakeApi.getJoyButton(int js); // get the Button value

    int QCakeApi.getKey(); // get the last pressed key

    int QCakeApi.keyPressed( int keycode); // return 1 if key is pressed 

    QCakeApi.switchScene(int objref); // switch the Scene to the Display

    QCakeApi.playSound(int objref); // play the Sound

    QCakeApi.stopSound(int objref); // play the Sound

    QCakeApi.switchCamera(int objref); // View from Camera to the Scene

    QCakeApi.srand(int seed); // set start for rand

    QCakeApi.addRelTorque (int objref, float x, float y, float z);

    QCakeApi.addRelForce (int objref, float x, float y, float z);

    QCakeApi.setAngVel (int objref, float x, float y, float z);

    QCakeApi.setLinVel (int objref, float x, float y, float z);

    QCakeApi.setSequence (int objref, int seq, int mode);  // Set the Sequence of md2 Objects

    int QCakeApi.astarFindPath (int pl, int sx, int sy, int tx, int ty); // find path for player from source to target
    
    int QCakeApi.astarReadPathX (int pl, int numx); // read x coordinate path for player 

    int QCakeApi.astarReadPathY (int pl, int numy); // read y coordinate path for player

    int QCakeApi.astarReadMap (char file); // read map file "." walkabel or unwalkable

    int QCakeApi.astarReadMapValue (int x, int y); // read map value[x][y]

    int QCakeApi.astarInit (width, height, tileSize, people); // by default (40,40,1,8) it exist, but if you want to change the values

    int QCakeApi.tmpobjInit (int objref, float x, float y, float z, float h, float p, float r, id); // make a temp. 3D-OBJ from objref.The tmp coordinate system is connected to the coordinate system of the Object with tempid=id. If id is zero the new object coordinates system is connected to the parent object (object[objref])

    int QCakeApi.getParentID(); // get the Parent ID from this

todo:

    QCakeApi.deltmpobj(int id);  // delete the tmbobj from the scene and the qcake listview tree

