python qcake QCake python Globals: --------------------- QCakeID // the ID from this script file QCake stdlib API: ----------------- class Vector: + oder += -> method operator_add(a, b) - oder -= -> method operator_sub(a, b) method init(x, y, z) class QCO: method getattr(attribute) method setattr(attribute, newvalue) Vector method getpos() Vector method getrot() method setpos(Vector v) method setrot(Vector r) // rotate global axis method rotate(Vector r) // rotate relativ object axis method move(Vector v) // move delta v method getpos_x() // position method getpos_y() method getpos_z() method getrot_h() method getrot_p() method getrot_r() method setsequence(int s, int m) // s -> sequence, m -> mode method Ref() // read the reference method init(_id) // get a reference of a 3D Object 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]) todo: QCakeApi.deltmpobj(int id); // delete the tmbobj from the scene and the qcake listview tree