RigsofRods  2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
VehicleAIClass.h
Go to the documentation of this file.
1 /*
2  This source file is part of Rigs of Rods
3 
4  Copyright 2005-2012 Pierre-Michel Ricordel
5  Copyright 2007-2012 Thomas Fischer
6  Copyright 2013-2016 Petr Ohlidal
7 
8  For more information, see http://www.rigsofrods.org/
9 
10  Rigs of Rods is free software: you can redistribute it and/or modify
11  it under the terms of the GNU General Public License version 3, as
12  published by the Free Software Foundation.
13 
14  Rigs of Rods is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
30 namespace Script2Game {
31 
44 {
45  // PLEASE maintain the same order as in 'bindings/VehicleAiAngelscript.cpp' and 'VehicleAI.h'
46 
47 public:
52  void setActive(bool value);
53 
58  bool isActive();
59 
66  void addWaypoint(string const&in id, vector3 const&in pos);
67 
72  void addWaypoints(dictionary &in d);
73 
82  void addEvent(string const&in id, int ev);
83 
93  void setValueAtWaypoint(string const&in id, int value_id, float value);
94 
101  vector3 getTranslation(int offset, unsigned int wp);
102 
103 }
104 
107 
108 } //namespace ScriptSideAPIs
Script2Game::VehicleAIClass::setActive
void setActive(bool value)
Activates/Deactivates the AI.
Script2Game::VehicleAIClass::addWaypoints
void addWaypoints(dictionary &in d)
Adds a dictionary with waypoints.
Script2Game::VehicleAIClass::getTranslation
vector3 getTranslation(int offset, unsigned int wp)
Gets offset translation based on vehicle rotation and waypoints.
Script2Game::VehicleAIClass
Binding of RoR::VehicleAI; Vehicle driving AI using waypoints.
Definition: VehicleAIClass.h:43
Script2Game
Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation.
Definition: AngelImGui_enums.h:7
Script2Game::VehicleAIClass::isActive
bool isActive()
Returns the status of the AI.
Script2Game::VehicleAIClass::setValueAtWaypoint
void setValueAtWaypoint(string const &in id, int value_id, float value)
Sets a value at a waypoint.
Script2Game::VehicleAIClass::addWaypoint
void addWaypoint(string const &in id, vector3 const &in pos)
Adds one waypoint.
Script2Game::VehicleAIClass::addEvent
void addEvent(string const &in id, int ev)
Adds a event.