|
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
66 int useOnlineAPI(
const string apiquery,
const dictionary dict,
string result);
107 bool deleteResource(
const string &in filename,
const string &in resource_group);
164 void message(
string txt,
string icon,
float timeMilliseconds,
bool forceVisible);
193 void showMessageBox(
string mTitle, stringmText,
bool button1, stringmButton1,
bool AllowClose,
bool button2, stringmButton2);
414 void spawnObject(
const string objectName,
const string instanceName, vector3 pos, vector3 rot,
const string eventhandler,
bool uniquifyMaterials);
536 BeamClass@
spawnTruckAI(
string truckName, vector3 pos,
string truckSectionConfig,
string truckSkin,
int x);
642 int setMaterialAmbient(
const string materialName,
float red,
float green,
float blue);
643 int setMaterialDiffuse(
const string materialName,
float red,
float green,
float blue,
float alpha);
644 int setMaterialSpecular(
const string materialName,
float red,
float green,
float blue,
float alpha);
647 int setMaterialTextureName(
const string materialName,
int techniqueNum,
int passNum,
int textureUnitNum,
const string textureName);
648 int setMaterialTextureRotate(
const string materialName,
int techniqueNum,
int passNum,
int textureUnitNum,
float rotation);
649 int setMaterialTextureScroll(
const string materialName,
int techniqueNum,
int passNum,
int textureUnitNum,
float sx,
float sy);
650 int setMaterialTextureScale(
const string materialName,
int techniqueNum,
int passNum,
int textureUnitNum,
float u,
float v);
vector3 getCameraDirection()
Gets the camera's direction.
void clearEventCache()
Clears the event cache.
array< vector3 > getWaypoints(int x)
void activateAllVehicles()
void loadTerrain(string terrain)
Loads a terrain.
int setMaterialSpecular(const string materialName, float red, float green, float blue, float alpha)
Binding of RoR::Sound; a single sound sample positioned in 3D space (spatial audio).
void setCameraDirection(vector3 direction)
Sets the camera's direction vector.
radian getPersonRotation()
void quitGame()
Quits the game.
void addWaypoint(vector3 pos)
BeamClass getTruckByNum(int truck_number)
Get an actor by Instance ID, get one from eventCallbackEx() or manually by BeamClass::getInstanceId()...
VehicleAIClass getCurrentTruckAI()
float stopTimer()
Stops the timer.
void moveObjectVisuals(const string instanceName, const vector3 pos)
This moves an object to a new position.
float rangeRandom(float from, float to)
Generates a random number between from and to.
void setChatFontSize(int size)
OBSOLETE - does nothing.
bool pushMessage(MsgType type, dictionary@ dict)
Pushes a message to internal message queue.
Binding of RoR::Terrain; represents a loaded terrain.
Binding of RoR::Actor; a softbody-physics gameplay object, can be anything from soda can to space shu...
bool getMousePositionOnTerrain(vector3 &out)
Calculates mouse cursor position on terrain.
void setCameraPitch(float angle)
Pitches the camera up/down anticlockwise around it's local z axis.
void updateDirectionArrow(string text, vector3 position)
set direction arrow
void startTimer()
Starts a timer (useful for races etc)
void removeVehicle(string instance, string box)
This method removes the vehicle in the box.
void openUrlInDefaultBrowser(const std::string &url)
Opens URL (must start with 'http://' or 'https://') in system's default web browser.
void setCameraPosition(vector3 position)
Sets the camera's position.
void setGravity(float value)
sets the gravity terrain wide.
bool deleteResource(const string &in filename, const string &in resource_group)
Deletes a resource from the given group.
void setAIVehicleName(int x, string name)
int getAIVehiclePositionScheme()
int getAIVehicleDistance()
Binding of RoR::VehicleAI; Vehicle driving AI using waypoints.
int addScriptFunction(const string func)
Adds a global function to the script.
void fetchUrlAsStringAsync(const std::string &url, const std::string &display_filename)
Invokes a background thread to fetch data using CURL; when finished, sends MSG_APP_SCRIPT_THREAD_STAT...
void showMessageBox(string mTitle, stringmText, bool button1, stringmButton1, bool AllowClose, bool button2, stringmButton2)
Shows a message box.
Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation.
void setAIVehicleDistance(int dist)
double getTime()
returns the time in seconds since the game was started
void backToMenu()
Back to menu.
bool checkResourceExists(const string &in filename, const string &in resource_group)
Checks if the resource file exists in the given group.
Ogre::String getAIVehicleSectionConfig(int x)
void setAIVehicleSkin(int x, string skin)
void spawnObject(const string objectName, const string instanceName, vector3 pos, vector3 rot, const string eventhandler, bool uniquifyMaterials)
This spawns an object.
int getCurrentTruckNumber()
returns the instance ID of current player vehicle, or -1 when in person mode
int getChatFontSize()
OBSOLETE - returns 0.
float getWaterHeight()
returns the current base water level (without waves)
int getLoadedTerrain(string result)
Gets the currently loaded terrain name.
void showChooser(string type, string instance, string box)
This shows a vehicle chooser.
Binding of RoR::GameScript; A general class that will provide you with general functions.
int deleteScriptVariable(const string var)
Removes a global variable from the script.
void setPersonPosition(vector3 vec)
sets the character position
int useOnlineAPI(const string apiquery, const dictionary dict, string result)
Sends or request information from the master server.
void setAIRepeatTimes(int times)
int scriptFunctionExists(const string func)
Checks if a global function exists.
array< SoundScriptTemplateClass > getAllSoundScriptTemplates()
void setWaterHeight(float value)
sets the base water height
int setMaterialTextureRotate(const string materialName, int techniqueNum, int passNum, int textureUnitNum, float rotation)
void setRegisteredEventsMask(ScriptUnitId_t nid, BitMask_t eventMask)
Overwrites event mask for a specific running script.
int setMaterialDiffuse(const string materialName, float red, float green, float blue, float alpha)
int ScriptUnitId_t
Unique sequentially generated ID of a loaded and running scriptin session. Use ScriptEngine::getScrip...
int getNumTrucksByFlag(int flag)
Number of trucks with flag.
dictionary getScriptDetails(int nid)
Returns all info about running script; obtain the NID from getRunningScripts(), global var thisScript...
void setPersonRotation(radian &in)
SoundScriptTemplateClass getSoundScriptTemplate(const string &in name)
Retrieves one sound script template by name.
vector2 getDisplaySize()
Gets screen size in pixels.
int sendGameCmd(const string &message)
Multiplayer only: sends AngelScript snippet to all players.
void setTrucksForcedAwake(bool forceActive)
void flashMessage(string message, float time, float charHeight)
shows a message to the user
SoundScriptInstanceClass createSoundScriptInstance(const string &in template_name, int actor_instance_id=-1)
array< int > getRunningScripts()
Returns active ScriptUnitIDs; check agains global var thisScript or use getScriptDetails() to get nam...
bool getCaelumAvailable()
Checks if Caleum is enabled.
bool getScreenPosFromWorldPos(const vector3 &in, vector2 &out)
BitMask_t getRegisteredEventsMask(ScriptUnitId_t nid)
Gets event mask for a specific running script.
Binding of RoR::SoundScriptTemplate; a customizable sound effect.
void destroyObject(const string instanceName)
This destroys an object.
void getAvgFPS()
Gets the average frames per second (FPS)
Binding of RoR::SoundScriptInstance; instance of SoundScriptTemplateClass.
void setAIVehicleSpeed(int speed)
bool createTextResourceFromString(const string &in, const string &in filename, const string &in resource_group, bool overwrite=false)
Saves a string as a text file resource.
int setMaterialEmissive(const string materialName, float red, float green, float blue)
void hideDirectionArrow()
Hides the direction arrow.
Ogre::Vector2 getMouseScreenPosition()
Gets mouse position in pixels.
vector3 getCameraPosition()
Retrieves the camera's position.
int setMaterialTextureScroll(const string materialName, int techniqueNum, int passNum, int textureUnitNum, float sx, float sy)
or anywhere else will not be considered a but parsed as regular data ! Each line is treated as values separated by separators Possible i e animators Multiline description Single instance
void repairVehicle(string instance, string box, bool keepPosition)
This method repairs the vehicle in the box.
string getCaelumTime()
gets the time of the day in seconds
float getGroundHeight(vector3 position)
returns the ground height for a position
array< BeamClass@> getAllTrucks()
returns an array of all currently existing actors.
int setMaterialAmbient(const string materialName, float red, float green, float blue)
BeamClass spawnTruck(stringtruckName, vector3 pos, vector3 rot)
Spawns a truck by filename.
float getGravity()
returns the currently set upo gravity
BeamClass spawnTruckAI(string truckName, vector3 pos, string truckSectionConfig, string truckSkin, int x)
std::string getAIVehicleSkin(int x)
int deleteScriptFunction(const string func)
Removes a global function from the script.
void setCaelumTime(float value)
sets the time of the day in seconds
VehicleAIClass getTruckAIByNum(int num)
void setAIVehicleCount(int count)
SoundClass createSoundFromResource(const string &in filename, const string &in resource_group_name=string())
std::string loadTextResourceAsString(const string &in filename, const string &in resource_group)
Loads a text file resource as string.
void setAIVehiclePositionScheme(int scheme)
void movePerson(vector3 relative_movement)
moves the person relative
void getFPS()
Gets the Curent frames per second (FPS)
void setCameraYaw(float angle)
Rotates the camera anticlockwise around it's local y axis.
Ogre::String getAIVehicleName(int x)
int setMaterialTextureScale(const string materialName, int techniqueNum, int passNum, int textureUnitNum, float u, float v)
void setCameraRoll(float angle)
Rolls the camera anticlockwise, around its local z axis.
void message(string txt, string icon, float timeMilliseconds, bool forceVisible)
shows a message to the user
void registerForEvent(int eventValue)
registers for a new event to be received by the scripting system
AngelOgre::SceneManager getSceneManager()
Retrieves the OGRE scene manager object.
array< SoundScriptInstanceClass > getAllSoundScriptInstances()
Diagnostic function, returns all existing sound script instances.
Encapsulates everything renderable by OGRE - use game.getSceneManager() to get it.
vector3 getPersonPosition()
Returns the current position of the person.
void boostCurrentTruck(float factor)
Gives the currently used truck a boost in RPM.
void log(string message)
writes a message to the scripting logbook (AngelScript.log)
int setMaterialTextureName(const string materialName, int techniqueNum, int passNum, int textureUnitNum, const string textureName)
void cameraLookAt(vector3 targetPoint)
Points the camera at a location in worldspace.
MsgType
Binding of RoR::MsgType; Global gameplay message loop.
void setAIVehicleSectionConfig(int x, string config)
int addScriptVariable(const string var)
Adds a global variable to the script.
BeamClass getCurrentTruck()
returns the current selected truck, null if in person mode
void unRegisterEvent(int eventValue)
unregisters from receiving event.
TerrainClass getTerrain()
Gets the currently loaded terrain instance.