Intro    Entity    Trait    Action

Action structure
  - "LifeAI_Action.h"

    Constructor
        Action

    Static
        getCount
        getAction (by number)
        getAction (by name)

    General
        setName
        getName
        getMemberCount


Constructor


LifeAI::Action( int memberCount = LAI_MIN_MEMBER, std::string name = LAI_DEF_ACTION_NAME )

When creating an Action, specify the number of action members, between 1 to 4.  Once created, the number of action members can not be changed later.  Can also optionally store a name string for it.


Static


static int LifeAI::Action::getCount()

Returns the total number of actions that have been created.  Can be useful if you need to iterate through all actions with getAction()


static Action* LifeAI::Action::getAction( int number )

Returns an action address, according to the number you specify in the parameter.  The "number" refers to the order of the action in the main action list.  For example, if you need to reference the first action created, the "number" should be 0.  For the second action, the "number" should be 1.  Can be useful if you need to iterate through all actions.


static Action* LifeAI::Action::getAction( std::string name )

Returns an action address, according to the string you specify in the "name" parameter.  Looks through the main action list and returns the first action that has that name.


General


void setName( std::string name )

Specify a optional name string for an action.  can be useful if you need to output action names in a program.  For example:
Talk.setName("Talk");


std::string getName()


Returns the name string stored for the action.


int getMemberCount()

Returns the total number of action members for an action.