RigsofRods
Soft-body Physics Simulation
Public Member Functions
Script2Game::VehicleAIClass Class Reference

Binding of RoR::VehicleAI; Vehicle driving AI using waypoints. More...

#include <VehicleAIClass.h>

Public Member Functions

void setActive (bool value)
 Activates/Deactivates the AI. More...
 
bool isActive ()
 Returns the status of the AI. More...
 
void addWaypoint (string const &in id, vector3 const &in pos)
 Adds one waypoint. More...
 
void addWaypoints (dictionary &in d)
 Adds a dictionary with waypoints. More...
 
void addEvent (string const &in id, int ev)
 Adds a event. More...
 
void setValueAtWaypoint (string const &in id, int value_id, float value)
 Sets a value at a waypoint. More...
 
vector3 getTranslation (int offset, unsigned int wp)
 Gets offset translation based on vehicle rotation and waypoints. More...
 
void setActive (bool value)
 Activates/Deactivates the AI. More...
 
bool isActive ()
 Returns the status of the AI. More...
 
void addWaypoint (string const &in id, vector3 const &in pos)
 Adds one waypoint. More...
 
void addWaypoints (dictionary &in d)
 Adds a dictionary with waypoints. More...
 
void addEvent (string const &in id, int ev)
 Adds a event. More...
 
void setValueAtWaypoint (string const &in id, int value_id, float value)
 Sets a value at a waypoint. More...
 
vector3 getTranslation (int offset, unsigned int wp)
 Gets offset translation based on vehicle rotation and waypoints. More...
 

Detailed Description

Binding of RoR::VehicleAI; Vehicle driving AI using waypoints.

Definition at line 63 of file VehicleAIClass.h.

Member Function Documentation

◆ addEvent() [1/2]

void Script2Game::VehicleAIClass::addEvent ( string const &in  id,
int  ev 
)

Adds a event.

Parameters
idThe waypoint ID.
evThe ID of the event.
See also
Ai_events

◆ addEvent() [2/2]

void Script2Game::VehicleAIClass::addEvent ( string const &in  id,
int  ev 
)

Adds a event.

Parameters
idThe waypoint ID.
evThe ID of the event.
See also
Ai_events

◆ addWaypoint() [1/2]

void Script2Game::VehicleAIClass::addWaypoint ( string const &in  id,
vector3 const &in  pos 
)

Adds one waypoint.

Parameters
idThe waypoint ID.
pointThe coordinates of the waypoint.

◆ addWaypoint() [2/2]

void Script2Game::VehicleAIClass::addWaypoint ( string const &in  id,
vector3 const &in  pos 
)

Adds one waypoint.

Parameters
idThe waypoint ID.
pointThe coordinates of the waypoint.

◆ addWaypoints() [1/2]

void Script2Game::VehicleAIClass::addWaypoints ( dictionary &in  d)

Adds a dictionary with waypoints.

Parameters
dDictionary with waypoints (string ID -> vector3 pos)

◆ addWaypoints() [2/2]

void Script2Game::VehicleAIClass::addWaypoints ( dictionary &in  d)

Adds a dictionary with waypoints.

Parameters
dDictionary with waypoints (string ID -> vector3 pos)

◆ getTranslation() [1/2]

vector3 Script2Game::VehicleAIClass::getTranslation ( int  offset,
unsigned int  wp 
)

Gets offset translation based on vehicle rotation and waypoints.

Parameters
offsetThe offset.
wpThe waypoint index.

◆ getTranslation() [2/2]

vector3 Script2Game::VehicleAIClass::getTranslation ( int  offset,
unsigned int  wp 
)

Gets offset translation based on vehicle rotation and waypoints.

Parameters
offsetThe offset.
wpThe waypoint index.

◆ isActive() [1/2]

bool Script2Game::VehicleAIClass::isActive ( )

Returns the status of the AI.

Returns
True if the AI is driving

◆ isActive() [2/2]

bool Script2Game::VehicleAIClass::isActive ( )

Returns the status of the AI.

Returns
True if the AI is driving

◆ setActive() [1/2]

void Script2Game::VehicleAIClass::setActive ( bool  value)

Activates/Deactivates the AI.

Parameters
valueActivate or deactivation the AI

◆ setActive() [2/2]

void Script2Game::VehicleAIClass::setActive ( bool  value)

Activates/Deactivates the AI.

Parameters
valueActivate or deactivation the AI

◆ setValueAtWaypoint() [1/2]

void Script2Game::VehicleAIClass::setValueAtWaypoint ( string const &in  id,
int  value_id,
float  value 
)

Sets a value at a waypoint.

Parameters
idThe waypoint ID.
value_idThe ID of the value that will be set.
valueThe value itself.
See also
Ai_values

◆ setValueAtWaypoint() [2/2]

void Script2Game::VehicleAIClass::setValueAtWaypoint ( string const &in  id,
int  value_id,
float  value 
)

Sets a value at a waypoint.

Parameters
idThe waypoint ID.
value_idThe ID of the value that will be set.
valueThe value itself.
See also
Ai_values

The documentation for this class was generated from the following file: