RigsofRods
Soft-body Physics Simulation
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 {
49 };
50 
55 {
58 };
59 
64 {
65  // PLEASE maintain the same order as in 'bindings/VehicleAiAngelscript.cpp' and 'VehicleAI.h'
66 
67 public:
72  void setActive(bool value);
73 
78  bool isActive();
79 
86  void addWaypoint(string const&in id, vector3 const&in pos);
87 
92  void addWaypoints(dictionary &in d);
93 
102  void addEvent(string const&in id, int ev);
103 
113  void setValueAtWaypoint(string const&in id, int value_id, float value);
114 
121  vector3 getTranslation(int offset, unsigned int wp);
122 
123 }
124 
127 
128 } //namespace ScriptSideAPIs
Script2Game::Ai_values
Ai_values
Enum with AI values that can be set.
Definition: VehicleAIClass.h:54
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::AI_BEACONSTOGGLE
@ AI_BEACONSTOGGLE
Definition: VehicleAIClass.h:48
Script2Game::Ai_events
Ai_events
Enum with AI events.
Definition: VehicleAIClass.h:43
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:63
Script2Game
Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation.
Definition: BeamClass.h:2
Script2Game::AI_SPEED
@ AI_SPEED
Definition: VehicleAIClass.h:56
Script2Game::AI_POWER
@ AI_POWER
Definition: VehicleAIClass.h:57
Script2Game::VehicleAIClass::isActive
bool isActive()
Returns the status of the AI.
Script2Game::AI_WAIT_SECONDS
@ AI_WAIT_SECONDS
Definition: VehicleAIClass.h:47
Script2Game::VehicleAIClass::setValueAtWaypoint
void setValueAtWaypoint(string const &in id, int value_id, float value)
Sets a value at a waypoint.
Script2Game::AI_LIGHTSTOGGLE
@ AI_LIGHTSTOGGLE
Definition: VehicleAIClass.h:46
Script2Game::VehicleAIClass::addWaypoint
void addWaypoint(string const &in id, vector3 const &in pos)
Adds one waypoint.
Script2Game::AI_HORN
@ AI_HORN
Definition: VehicleAIClass.h:45
Script2Game::VehicleAIClass::addEvent
void addEvent(string const &in id, int ev)
Adds a event.