Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AIFlyToWaypointDefend Class Reference

#include <missionscript.h>

Inheritance diagram for AIFlyToWaypointDefend:
AImissionScript FlyByWire Orders::MatchVelocity Orders::MatchAngularVelocity Order

Public Member Functions

 AIFlyToWaypointDefend (const QVector &waypoint, float vel, bool afburn, float range, float defend_range)
 
- Public Member Functions inherited from AImissionScript
 AImissionScript (string modulename)
 saves scriptname in the filename var More...
 
 ~AImissionScript ()
 
void Execute ()
 Loads the AI script from the hard drive, or executes if loaded. More...
 
virtual string getOrderDescription ()
 
- Public Member Functions inherited from FlyByWire
 FlyByWire ()
 
 ~FlyByWire ()
 
void SwitchFlightMode ()
 
void ThrustRight (float percent)
 Turns on or off velocity resolution. More...
 
void ThrustUp (float percent)
 
void ThrustFront (float percent)
 
void DirectThrustRight (float percent)
 
void DirectThrustUp (float percent)
 
void DirectThrustFront (float percent)
 
void SheltonSlide (bool onoff)
 
void InertialFlight (bool onoff)
 
bool InertialFlight () const
 
bool InertialFlightEnable () const
 
void Stop (float percentage)
 Stops... sets desired velocity to 0. More...
 
void Right (float percentage)
 pass in the percentage of the turn they were turnin right. -age indicates left More...
 
void Up (float percentage)
 pass in the percentage of the turn they were turning up More...
 
void RollRight (float percentage)
 
void Afterburn (float percentage)
 Specifies match speed to use afterbuner and gives in higher velocity. More...
 
void MatchSpeed (const Vector &velocity)
 matches set_speed to this velocity's magnitude More...
 
void Accel (float percentage)
 negative is decel... 0 = nothing More...
 
- Public Member Functions inherited from Orders::MatchVelocity
 MatchVelocity (const Vector &desired, const Vector &desired_ang, const bool Local, const bool afterburner, const bool fini=true)
 
void SetDesiredVelocity (const Vector &desired, const bool Local)
 
void SetAfterburn (bool use_afterburn)
 
virtual ~MatchVelocity ()
 
- Public Member Functions inherited from Orders::MatchAngularVelocity
 MatchAngularVelocity (const Vector &desired, bool Local, bool fini=true)
 
void SetDesiredAngularVelocity (const Vector &desired, bool Local)
 
virtual ~MatchAngularVelocity ()
 
- Public Member Functions inherited from Order
virtual void ChooseTarget ()
 this function calls the destructor (needs to be overridden for python; More...
 
virtual bool PursueTarget (Unit *, bool isleader)
 
void ClearMessages ()
 clears the messasges of this order More...
 
 Order ()
 The default constructor setting everything to NULL and no dependency on order. More...
 
 Order (int type, int subtype)
 The constructor that specifies what order dependencies this order has. More...
 
virtual void Destroy ()
 The virutal function that unrefs all memory then calls Destruct () which takes care of unreffing this or calling delete on this. More...
 
OrderqueryType (unsigned int type)
 returns a pointer to the first order that may be bitwised ored with that type More...
 
OrderqueryAny (unsigned int type)
 returns a pointer to the first order that may be bitwise ored with any type More...
 
void eraseType (unsigned int type)
 Erases all orders that bitwise OR with that type. More...
 
bool AttachOrder (Unit *targets)
 Attaches a group of targets to this order (used for strategery-type games) More...
 
bool AttachOrder (QVector target)
 Attaches a navigation point to this order. More...
 
bool AttachSelfOrder (Unit *targets)
 Attaches a group (form up) to this order. More...
 
OrderEnqueueOrder (Order *ord)
 Enqueues another order that will be executed (in parallel perhaps) when next void Execute() is called. More...
 
OrderReplaceOrder (Order *ord)
 Replaces the first order of that type in the order queue. More...
 
bool Done ()
 
int getType ()
 
int getSubType ()
 
virtual void SetParent (Unit *parent1)
 Sets the parent of this Unit. Any virtual functions must call this one. More...
 
UnitGetParent () const
 
virtual void Communicate (const class CommunicationMessage &c)
 Sends a communication message from the Unit (encapulated in c) to this unit. More...
 
virtual void ProcessCommMessage (class CommunicationMessage &c)
 processes a single message...generally called by the Messages() func More...
 
virtual void ProcessCommunicationMessages (float CommRepsonseTime, bool RemoveMessageProcessed)
 responds (or does not) to certain messages in the message queue More...
 
OrderfindOrder (Order *ord)
 return pointer to order or NULL if not found More...
 
void eraseOrder (Order *ord)
 erase that order from the list More...
 
OrderEnqueueOrderFirst (Order *ord)
 enqueue order as first order More...
 
virtual olist_tgetOrderList ()
 returns the orderlist (NULL for orders that haven't got any) More...
 
virtual void AdjustRelationTo (Unit *un, float factor)
 
OrderfindOrderList ()
 searches the suborders recursively for the first order that has an orderlist More...
 
std::string createFullOrderDescription (int level=0)
 
void setActionString (std::string astring)
 
std::string getActionString ()
 
virtual float getMood ()
 

Public Attributes

QVector waypoint
 
float vel
 
float range
 
bool aburn
 

Additional Inherited Members

- Public Types inherited from Order
enum  ORDERTYPES {
  MOVEMENT =1, FACING =2, WEAPON =4, CLOAKING =8,
  ALLTYPES =(1|2|4|8)
}
 The varieties of order types MOVEMENT,FACING, and WEAPON orders may not be mutually executed (lest one engine goes left, the other right) More...
 
enum  SUBORDERTYPES { SLOCATION =1, STARGET =2, SSELF =4 }
 
- Protected Member Functions inherited from Order
virtual ~Order ()
 
virtual void Destructor ()
 changes the local relation of this unit to another...may inform superiors about "good" or bad! behavior depending on the AI More...
 
- Protected Attributes inherited from AImissionScript
string modulename
 
unsigned int classid
 
bool first_run
 

Detailed Description

Definition at line 67 of file missionscript.h.

Constructor & Destructor Documentation

AIFlyToWaypointDefend::AIFlyToWaypointDefend ( const QVector waypoint,
float  vel,
bool  afburn,
float  range,
float  defend_range 
)

Definition at line 119 of file missionscript.cpp.

References aburn, varInst::bool_val, Mission::call_vector_into_olist(), AImissionScript::classid, varInst::float_val, Mission::lookupClassVariable(), mission, AImissionScript::modulename, range, vel, and waypoint.

120  : AImissionScript( "ai_flyto_waypoint_defend" )
121 {
122  waypoint = wp;
123  vel = velo;
124  range = rng;
125  aburn = afburn;
126 
127  varInst *vi_wp = mission->lookupClassVariable( modulename, "waypoint", classid );
129 
130  varInst *vi_range = mission->lookupClassVariable( modulename, "abort_range", classid );
131  vi_range->float_val = range;
132 
133  varInst *vi_defrange = mission->lookupClassVariable( modulename, "defend_range", classid );
134  vi_defrange->float_val = defend_range;
135 
136  varInst *vi_vel = mission->lookupClassVariable( modulename, "vel", classid );
137  vi_vel->float_val = vel;
138 
139  varInst *vi_aburn = mission->lookupClassVariable( modulename, "afterburner", classid );
140  vi_aburn->bool_val = aburn;
141 }

Member Data Documentation

bool AIFlyToWaypointDefend::aburn

Definition at line 74 of file missionscript.h.

Referenced by AIFlyToWaypointDefend().

float AIFlyToWaypointDefend::range

Definition at line 73 of file missionscript.h.

Referenced by AIFlyToWaypointDefend().

float AIFlyToWaypointDefend::vel

Definition at line 72 of file missionscript.h.

Referenced by AIFlyToWaypointDefend().

QVector AIFlyToWaypointDefend::waypoint

Definition at line 71 of file missionscript.h.

Referenced by AIFlyToWaypointDefend().


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