FunctionReturnsDescription
open <file> at <string>-Open file at location.
write <string> in <file>-Write string to file.
sqrt <float>floatReturns square root of x.
pow <float> to <float>floatReturns the result of x to the power of y.
substring <string> from <int> to <int>stringReturns substring of string (1st parameter) from 2nd to 3rd parameter
length <string>intReturns length of given string.
find <string> in <string>intFinds key (2nd parameter) in given string (1st parameter) and returns index.
read <file> linestringRead line of file.
flush <file>-Flushes file.
abs <float>floatReturns absolute value of x.
acos <float>floatReturns acosine of x.
asin <float>floatReturns asine of x.
atan <float>floatReturns atan of x.
atan2 <float[2]>floatReturns atan2 of x and y.
ceil <float>floatReturns ceil of x.
cos <float>floatReturns cos of x.
cosh <float>floatReturns cosh of x.
exp <float>floatReturns exp of x.
fabs <float>floatReturns fabs of x.
floor <float>floatReturns floor of x.
log <float>floatReturns log of x.
log10 <float>floatReturns log10 of x.
sin <float>floatReturns sin of x.
sinh <float>floatReturns sinh of x.
tan <float>floatReturns tan of x.
tanh <float>floatReturns tanh of x.
get pbody id <int>pbodyReturns physics body with given unique ID'
get <pbody> posfloat[3]Returns current coordinates of physics-body
get <pbody> rotfloat[4]Returns current rotation of physics-body
get <pbody> velfloat[3]Returns current velocity of physics-body
get <pbody> rotvelfloat[3]Returns current rotational velocity of physics-body
set <pbody> pos <float[3]>-Sets position of physics-body
set <pbody> rot <float[4]>-Sets rotation of physics-body
set <pbody> vel <float[3]>-Sets velocity of physics-body
set <pbody> rotvel <float[3]>-Sets rotational velocity of physics-body
remove joint <pbody>-Removes associated joint
add <pbody> bodyforce <float[3]> at <float[3]>-Adds bodyforce of physics-body at body position
add <pbody> bodyforce <float[3]> at cg-Adds bodyforce of physics-body at cg
add <pbody> bodytorque <float[3]>-Adds bodytorque of physics-body
add <pbody> worldforce <float[3]> at <float[3]>-Adds worldforce of physics-body at body position
add <pbody> bodyforce <float[3]> at cg-Adds worldforce of physics-body at cg
add <pbody> worldtorque <float[3]>-Adds worldtorque of physics-body
set <pbody> jointlimit <float[2]>-Set limits of joints (Radians).
create joint <pbody> with parent <pbody> with offset <float[3]>-Creates joint between 2 given physics bodys. joint offset is relative to child.
get <pbody> has jointintDoes this physics body have a joint?.
get <pbody> joint parent idintReceive physics body ID of parent joint.
get <pbody> freezeintGet if body is frozen.
set <pbody> freeze <int>-Set if body is frozen.
set <pbody> jointdir <float[3]>-Set direction of joints (normalized).
get local carrcarReturns the local car.
get carcountintReturns total carcount.
get car <int>rcarReturns car by given index.
get scriptowner carrcarReturns the car that owns this script.
get focus carrcarReturns the focus car.
get <rcar> posfloat[3]Returns position for given car.
get <rcar> rotfloat[4]Returns rotation for given car.
get <rcar> velocityfloat[3]Returns velocity for given car.
get <rcar> rotvelocityfloat[4]Returns rotvelocity for given car.
get <rcar> rpmfloatReturns RPM for given car.
get <rcar> tachovelocityfloatReturns tacho velocity for given car. in KM/H.
get <rcar> gearintReturns current gear for given car. 0=Neutral, 1=Reverse, 2=1st,...
get <rcar> tc enabledintReturns if traction control is enabled for given car.
get <rcar> asl enabledintReturns if asl is enabled for given car.
get <rcar> abs enabledintReturns if abs is enabled for given car.
set <rcar> tc <int>-Set traction control for given car (0 or 1).
set <rcar> asl <int>-Set asl for given car (0 or 1).
set <rcar> abs <int>-Set abs for given car (0 or 1).
get <rcar> tc activeintReturns if traction control is active for given car.
get <rcar> asl activeintReturns if asl is active for given car.
get <rcar> abs activeintReturns if abs is active for given car.
get <rcar> throttlefloatGet Throttle for given car (0 -> 1).
set <rcar> throttle <float>-Set Throttle for given car (0 -> 1).
get <rcar> brakefloatGet brake for given car (0 -> 1).
set <rcar> brake <float>-Set brake for given car (0 -> 1).
get <rcar> clutchfloatGet clutch for given car (0 -> 1).
get <rcar> steeranglefloatGet steerangle for given car (radians).
get <rcar> max steeranglefloatGet msx steerangle for given car (radians).
get generic model <int> of <rcar>rcarmodelGet generic model of car.
set <rcarmodel> position <float[3]>-Set generic model position offset.
set <rcarmodel> rotation <float[3]>-Set generic model rotation offset in radians.
set <rcarmodel> scriptcontrolled <int>-Set if this model is controlled by the script (pos/rot).
get <rcar> drivernamestringGet drivername of car.
get <rcar> bestlapintGet best laptime in milliseconds.
get <rcar> idintGet ID of car, these ID's are reliable over network, so use this to address cars over network.
get car by id <int>rcarGet car by ID, these ID's are reliable over network, so use this to address cars over network.
get <rcar> pbody idintGet car physics body ID.
get <rcar> maxtorque factorfloatGet engine max torque factor.
set <rcar> maxtorque factor <float>-Set engine max torque factor.
set <rcar> gear <int>-Set current gear for given car. 0=Neutral, 1=Reverse, 2=1st,...
get <rcar> movablesintGet car movablecount.
get <rcar> movable <int>rmovableGet car movable by index.
get <rcar> route destination waypointintGet car waypoint-destination.
set <rcar> route <int>intSet route for given car. Returns 1 if succeeded
set <rcar> fastest route <int>intSet fastest route for given car. Returns 1 if succeeded
get <rcar> route from waypointintGet car's route 'from' waypoint. This is the waypoint where we were last.
get <rcar> route to waypointintGet car's route 'to' waypoint. This is the waypoint where we should be heading at.
get <rcar> route progress from tofloatGet car's route progress between waypoint 'from' (0.0) and 'to' (1.0f).
get <rcar> route autorecalcintGet if route is recalculated when the car is not following the specified route.
set <rcar> route autorecalc <int>-Set if route is recalculated when the car is not following the specified route.
get <rcar> route arrivedintGet if car is arrived at destination.
get <rcar> route ideal distancefloatGet car's route distance from the ideal route position.
get <rcar> route list current indexintGet car routelist's current index. The routelist is a list of waypoints that make out a route.
get <rcar> route list sizeintGet car routelist size. The routelist is a list of waypoints that make out a route.
get <rcar> route list element <int>intGet car routelist's waypoint by index. The routelist is a list of waypoints that make out a route.
get <rcar> trafficintGet if car is traffic enabled.
set <rcar> randomroute <int>-Set if car drives random routes.
get <rcar> randomrouteintGet if car drives random routes.
get traffic carsintGet number of traffic cars.
get traffic car <int>rcarGet car is traffic.
set <rcar> traffic <int>-Sets traffic flag of given car.
set <rcar> traffic velocityfactor <float>-Sets velocity factor of given traffic car.
get <rcar> traffic velocityfactorfloatGets velocity factor of given traffic car.
get <rcar> steerposfloatReturns steer-position for given car.
get <rcar> nmfloatReturns nm for given car.
get <rcar> gforcefloat[3]Returns gforce for given car.
get <rcar> aiintReturns whether giver car is controlled by AI.
set <rcar> ai <int>-Sets AI of given car.
get <rcar> aliveintReturns whether given car is still alive.
get <rcar> sizefloat[3]Returns size of car.
get <rcar> wheel <int> velocityfloat[3]Returns velocity of indexed wheel of given car.
get <rcar> wheel <int> contactwcfloat[3]Returns contactwc of indexed wheel of given car.
get <rcar> wheel <int> loadfloatReturns load of indexed wheel of given car.
get <rcar> wheel <int> slipanglefloatReturns slipangle of indexed wheel of given car.
get <rcar> wheel <int> slipratiofloatReturns slipratio of indexed wheel of given car.
get <rcar> wheel <int> optimal slipanglefloatReturns optimal slipangle of indexed wheel of given car.
get <rcar> wheel <int> optimal slipratiofloatReturns optimal slipratio of indexed wheel of given car.
get <rcar> wheel <int> surfacetypeintReturns surfacetype under indexed wheel of given car.
get <rcar> wheel <int> powergearingfloatReturns powergearing of indexed wheel of given car.
set <rcar> wheel <int> powergearing <float>-Sets powergearing of indexed wheel of given car.
set <rcar> wheel <int> brakefactor <float>-Sets brakefactor of indexed wheel of given car.
get <rcar> wheel <int> brakefactorfloatReturns brakefactor of indexed wheel of given car.
set <rcar> wheel <int> gripfactor <float>-Sets gripfactor of indexed wheel of given car.
get <rcar> wheel <int> gripfactorfloatReturns gripfactor of indexed wheel of given car.
get <rcar> wheel <int> surfaceindexintReturns surface index (from special.ini surf_* order) under indexed wheel of given car.
get surface countintReturns number of defined surfaces.
get surface <int> namestringReturns name of indexed surface.
get movable <string>rmovableReturns movable with given name.
command <rmovable> do <string>-Sends command to give movable.
get <rmovable> pbody countintGet number of physics bodys in movable.
get <rmovable> pbody <int>pbodyGet indexed physics bodys of movable.
wait <int>-Script waits for a given amount of time (milliseconds).
resolutionint[2]Returns resolution.
paint <string> at <int[2]>-Paints text at given xy coordinates. Be sure that you use this function ONLY in the paint-tick.
set color <float[4]>-Set paint-color (for painting text for example).
set font <string>-Set your own custom font by referencing a font file.
set fontsize x <float> y <float>-Set current font size. (only applies to active font)
intervalintReturns interval between the current tick and the previous tick of active script (milliseconds).
randomintReturns random integer number.
pause-Pauses racer.
unpause-Unpauses racer.
pausedintReturns whether racer is paused or not.
reset-Resets active session.
exit-Exits active session.
simtimeintReturns current simulation time (milliseconds).
multiviewintReturns whether racer is configured as multiview client.
spectatorintReturns whether racer is configured as spectator.
trackdirstringReturns current track directory.
qdbg <string>-Prints a debug message.
timeline <int> posfloat[3]Returns coordinates of given time-line ("from" coordinates).
set paint racestats <int>-Enables or disables painting of the race-stats.
send <string> to console-Send string to console.
is key <int> pressedintIs key pressed (range 0 to 255).
paint rect at <int[2]> size <int[2]>-Draws a filled rectangle with x and y of parameter 1, and wid and height of parameter 2.
paint <rtex> at <int[2]> size <int[2]>-Draws a bitmap texture with x and y of parameter 1, and wid and height of parameter 2.
create tex <string>rtexCreates texture from string and returns texture object.
set kill after run <int>-Set if we want this script to be terminated after it has ended it's run. (some scripts will restart)
get kill after runintGet if we want this script to be terminated after it has ended it's run. (some scripts will restart)
laptime <int> to stringstringConverts laptime (ms) to a string
serverintReturns whether racer is configured as server.
publicserverintReturns whether racer is configured as public server.
servertimeintGet estimated time on server.
print <string> to console-Prints a message to the console.
get heatintReturns current heat number.
paint <rtex> at <int[2]> alpha <float> size <int[2]>-Draws a bitmap texture with x and y of parameter 1, alpha of parameter 2, and wid and height of parameter 3.
waypointcountintGet number of waypoints
set waypoint <int> can pass dynamic <int>-Set if waypoint is blocked for passing cars (cars will stop at this waypoint).
get waypoint <int> can pass dynamicintGet if waypoint is blocked for passing cars (cars will stop at this waypoint).
set waypoint <int> can pass randomroute <int>-Set if waypoint is blocked when calculating routes.
get waypoint <int> can pass randomrouteintGet if waypoint is blocked when calculating routes.
get waypoint <int> velocityfloatGet velocity of waypoint.
get waypoint <int> posfloat[3]Get position of waypoint.
get waypoint <int> forwardintGet forward waypoint of waypoint.
get waypoint <int> leftintGet left waypoint of waypoint.
get waypoint <int> rightintGet right waypoint of waypoint.
warp <rcar> to waypoint <int>intWarp indexed car to waypoint. Returns 1 on succes.
warp <rcar> on waypoint <int> dir <int>intWarp indexed car to waypoint with heading to another waypoint. Returns 1 on succes.
warp <rcar> on waypoint <int> posoffset <float[3]>intWarp indexed car to waypoint with offset of pos. Returns 1 on succes.
get system <string>floatGet system parameter or signal.
set system <string> to <float>-Set system parameter (signals can't be set).
echo <string>-Prints a message to the console.
get node <string>rnodeGet node with given name (is usually trackdir+"/"+doffilename).
hide <rnode>-Hide given node.
show <rnode>-Show given node.
scale motion <float>-Scale motion.