66 int useOnlineAPI(
const string apiquery,
const dictionary dict,
string result);
136 AngelScript::CScriptArray*
findResourceFileInfo(
const std::string& resource_group,
const std::string& pattern,
bool dirs =
false);
170 void message(
string txt,
string icon,
float timeMilliseconds,
bool forceVisible);
199 void showMessageBox(
string mTitle, stringmText,
bool button1, stringmButton1,
bool AllowClose,
bool button2, stringmButton2);
447 void spawnObject(
const string objectName,
const string instanceName, vector3 pos, vector3 rot,
const string eventhandler,
bool uniquifyMaterials);
717 int setMaterialTextureName(
const string materialName,
int techniqueNum,
int passNum,
int textureUnitNum,
const string textureName);
Encapsulates everything renderable by OGRE - use game.getSceneManager() to get it.
Binding of RoR::Actor; a softbody-physics gameplay object, can be anything from soda can to space shu...
Binding of RoR::GameScript; A general class that will provide you with general functions.
void setAIVehicleName(int x, string name)
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.
void movePerson(vector3 relative_movement)
moves the person relative
void setAIVehicleDistance(int dist)
radian getPersonRotation()
AngelOgre::SceneManager getSceneManager()
Retrieves the OGRE scene manager object.
void hideDirectionArrow()
Hides the direction arrow.
void setGravity(float value)
sets the gravity terrain wide.
array< Ogre::MovableObjects@> getMousePointedMovableObjects()
Returns array<Ogre::MovableObjects@> in no particular order; works using bounding boxes so large/gene...
SoundScriptInstanceClass createSoundScriptInstance(const string &in template_name, int actor_instance_id=-1)
FreeBeamGfxID_t getFreeBeamGfxNextId()
Returns an unused (not reused) ID to use with MSG_SIM_ADD_FREEBEAMGFX_REQUESTED; see game....
ScriptRetCode scriptFunctionExists(const string func, ScriptUnitId_t nid=-2)
Checks if a global function exists.
array< int > getRunningScripts()
Returns active ScriptUnitIDs; check agains global var thisScript or use getScriptDetails() to get nam...
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 setCameraRoll(float angle)
Rolls the camera anticlockwise, around its local z axis.
int setMaterialTextureScroll(const string materialName, int techniqueNum, int passNum, int textureUnitNum, float sx, float sy)
void loadTerrain(string terrain)
Loads a terrain.
float rangeRandom(float from, float to)
Generates a random number between from and to.
void cameraLookAt(vector3 targetPoint)
Points the camera at a location in worldspace.
void setAIVehiclePositionScheme(int scheme)
int getNumTrucksByFlag(int flag)
Number of trucks with flag.
ScriptRetCode addScriptFunction(const string func, ScriptUnitId_t nid=-2)
Adds a global function to the script.
dictionary getScriptDetails(int nid)
Returns all info about running script; obtain the NID from getRunningScripts(), global var thisScript...
VehicleAIClass getTruckAIByNum(int num)
int setMaterialTextureRotate(const string materialName, int techniqueNum, int passNum, int textureUnitNum, float rotation)
SoundScriptTemplateClass getSoundScriptTemplate(const string &in name)
Retrieves one sound script template by name.
int setMaterialTextureName(const string materialName, int techniqueNum, int passNum, int textureUnitNum, const string textureName)
int getCurrentTruckNumber()
returns the instance ID of current player vehicle, or -1 when in person mode
array< SoundScriptInstanceClass > getAllSoundScriptInstances()
Diagnostic function, returns all existing sound script instances.
void getAvgFPS()
Gets the average frames per second (FPS)
vector3 getCameraDirection()
Gets the camera's direction.
void openUrlInDefaultBrowser(const std::string &url)
Opens URL (must start with 'http://' or 'https://') in system's default web browser.
int setMaterialSpecular(const string materialName, float red, float green, float blue, float alpha)
void setCameraYaw(float angle)
Rotates the camera anticlockwise around it's local y axis.
BitMask_t getRegisteredEventsMask(ScriptUnitId_t nid)
Gets event mask for a specific running script.
int setMaterialEmissive(const string materialName, float red, float green, float blue)
void setCameraPosition(vector3 position)
Sets the camera's position.
ScriptRetCode deleteScriptVariable(const string var, ScriptUnitId_t nid=-2)
Removes a global variable from the script.
bool checkResourceExists(const string &in filename, const string &in resource_group)
Checks if the resource file exists in the given group.
void setRegisteredEventsMask(ScriptUnitId_t nid, BitMask_t eventMask)
Overwrites event mask for a specific running script.
bool deleteResource(const string &in filename, const string &in resource_group)
Deletes a resource from the given group.
AngelScript::CScriptArray * findResourceFileInfo(const std::string &resource_group, const std::string &pattern, bool dirs=false)
Proxy to Ogre::ResourceGroupManager::findResourceFileInfo(), see https://ogrecave....
array< SoundScriptTemplateClass > getAllSoundScriptTemplates()
bool pushMessage(MsgType type, dictionary@ dict)
Pushes a message to internal message queue.
float getWaterHeight()
returns the current base water level (without waves)
void setWaterHeight(float value)
sets the base water height
void setAIVehicleSpeed(int speed)
TerrainClass getTerrain()
Gets the currently loaded terrain instance.
void quitGame()
Quits the game.
ScriptRetCode deleteScriptFunction(const string func, ScriptUnitId_t nid=-2)
Removes a global function from the script.
void setAIVehicleSkin(int x, string skin)
void registerForEvent(int eventValue)
registers for a new event to be received by the scripting system
int setMaterialTextureScale(const string materialName, int techniqueNum, int passNum, int textureUnitNum, float u, float v)
float getGravity()
returns the currently set upo gravity
float stopTimer()
Stops the timer.
void setPersonRotation(radian &in)
int getAIVehiclePositionScheme()
vector2 getDisplaySize()
Gets screen size in pixels.
void activateAllVehicles()
int getAIVehicleDistance()
int getChatFontSize()
OBSOLETE - returns 0.
float getGroundHeight(vector3 position)
returns the ground height for a position
void spawnObject(const string objectName, const string instanceName, vector3 pos, vector3 rot, const string eventhandler, bool uniquifyMaterials)
This spawns an object.
VehicleAIClass getCurrentTruckAI()
Ogre::String getAIVehicleSectionConfig(int x)
string getCaelumTime()
gets the time of the day in seconds
double getTime()
returns the time in seconds since the game was started
int useOnlineAPI(const string apiquery, const dictionary dict, string result)
Sends or request information from the master server.
BeamClass getTruckRemotelyReceivingCommands()
Actors with 'importcommands' flag will remotely respond to command keys when the player is close enou...
void getFPS()
Gets the Curent frames per second (FPS)
void setCameraPitch(float angle)
Pitches the camera up/down anticlockwise around it's local z axis.
ScriptRetCode addScriptVariable(const string var, ScriptUnitId_t nid=-2)
Adds a global variable to the script.
void updateDirectionArrow(string text, vector3 position)
set direction arrow
void setAIVehicleSectionConfig(int x, string config)
std::string getAIVehicleSkin(int x)
vector3 getCameraPosition()
Retrieves the camera's position.
int setMaterialAmbient(const string materialName, float red, float green, float blue)
void destroyObject(const string instanceName)
This destroys an object.
void boostCurrentTruck(float factor)
Gives the currently used truck a boost in RPM.
Ogre::Vector2 getMouseScreenPosition()
Gets mouse position in pixels.
void setCaelumTime(float value)
sets the time of the day in seconds
array< BeamClass@> getAllTrucks()
returns an array of all currently existing actors.
void setAIVehicleCount(int count)
SoundClass createSoundFromResource(const string &in filename, const string &in resource_group_name=string())
void showChooser(string type, string instance, string box)
This shows a vehicle chooser.
void log(string message)
writes a message to the scripting logbook (AngelScript.log)
int sendGameCmd(const string &message)
Multiplayer only: sends AngelScript snippet to all players.
int setMaterialDiffuse(const string materialName, float red, float green, float blue, float alpha)
bool getMousePositionOnTerrain(vector3 &out)
Calculates mouse cursor position on terrain.
void backToMenu()
Back to menu.
void unRegisterEvent(int eventValue)
unregisters from receiving event.
int getLoadedTerrain(string result)
Gets the currently loaded terrain name.
vector3 getPersonPosition()
Returns the current position of the person.
void setTrucksForcedAwake(bool forceActive)
ScriptRetCode scriptVariableExists(const string var, ScriptUnitId_t nid=-2)
Checks if a global variable exists in the script.
void message(string txt, string icon, float timeMilliseconds, bool forceVisible)
shows a message to the user
void showMessageBox(string mTitle, stringmText, bool button1, stringmButton1, bool AllowClose, bool button2, stringmButton2)
Shows a message box.
Ogre::String getAIVehicleName(int x)
void setChatFontSize(int size)
OBSOLETE - does nothing.
void repairVehicle(string instance, string box, bool keepPosition)
This method repairs the vehicle in the box.
bool getScreenPosFromWorldPos(const vector3 &in, vector2 &out)
ScriptRetCode getScriptVariable(const string &in varName, ?&ref, ScriptUnitId_t nid=-2)
Retrieves a memory address of a global variable in any script.
void flashMessage(string message, float time, float charHeight)
shows a message to the user
array< TerrainEditorObjectClassPtr@> getEditorObjects()
Returns all static objects on map (from any source).
array< vector3 > getWaypoints(int x)
void clearEventCache()
Clears the event cache.
FreeForceID_t getFreeForceNextId()
Returns an unused (not reused) ID to use with MSG_SIM_ADD_FREEFORCE_REQUESTED; see game....
bool getCaelumAvailable()
Checks if Caleum is enabled.
void moveObjectVisuals(const string instanceName, const vector3 pos)
This moves an object to a new position.
int getActorNextInstanceId()
Returns an unused (not reused) ID to use with MSG_SIM_SPAWN_ACTOR_REQUESTED; see game....
BeamClass getCurrentTruck()
returns the current selected truck, null if in person mode
BeamClass spawnTruck(stringtruckName, vector3 pos, vector3 rot)
Spawns a truck by filename.
void startTimer()
Starts a timer (useful for races etc)
BeamClass getTruckByNum(int truck_number)
Get an actor by Instance ID, get one from eventCallbackEx() or manually by BeamClass::getInstanceId()...
BeamClass spawnTruckAI(string truckName, vector3 pos, string truckSectionConfig, string truckSkin, int x)
void addWaypoint(vector3 pos)
void setAIRepeatTimes(int times)
void setPersonPosition(vector3 vec)
sets the character position
void removeVehicle(string instance, string box)
This method removes the vehicle in the box.
void setCameraDirection(vector3 direction)
Sets the camera's direction vector.
std::string loadTextResourceAsString(const string &in filename, const string &in resource_group)
Loads a text file resource as string.
Binding of RoR::Sound; a single sound sample positioned in 3D space (spatial audio).
Binding of RoR::SoundScriptInstance; instance of SoundScriptTemplateClass.
Binding of RoR::SoundScriptTemplate; a customizable sound effect.
Binding of RoR::Terrain; represents a loaded terrain.
Binding of RoR::VehicleAI; Vehicle driving AI using waypoints.
Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation.
ScriptRetCode
Binding of RoR::ScriptRetCode; Common return codes for script manipulation funcs (add/get/delete | fu...
MsgType
Binding of RoR::MsgType; Global gameplay message loop; used with `game.pushMessage()`.