Ground of Aces Scripting API
Public Member Functions | List of all members
CharacterScriptApi Class Reference

This class is available under a global characters variable. More...

Public Member Functions

uint GetVoxelObjectId (string characterId)
 Retrieve a voxel object ID from a character. More...
 
bool DestroyCarriedResource (string characterId)
 Destroy the resource carried by a character. More...
 
int GetPilotMissionCount (string characterId)
 Get the amount of flight missions a pilot has completed More...
 
int GetPilotSuccessfulMissionCount (string characterId)
 Get the amount of successful flight missions a pilot has completed More...
 
float GetMorale (string characterId, MoraleCategory category)
 Get specific morale value for a character More...
 
void SetMorale (MoraleCategory category, float value)
 Set specific morale value for every character More...
 
void SetMorale (string characterId, MoraleCategory category, float value)
 Set specific morale value for a specific character More...
 
void ModifyMorale (MoraleCategory category, float delta)
 Modify morale of every character on the base. More...
 
void ModifyMorale (string characterId, MoraleCategory category, float delta)
 Modify morale of a single character. More...
 
bool TriggerEffect (string characterId, MoraleCategory category)
 Trigger a breaking point effect associated with particular morale category. More...
 
void SetTemporaryMoraleState (string characterId, CharacterMoraleStateFlag moraleStateFlag, int duration)
 Set a morale state for a temporary amount of time on a single character on the base More...
 

Detailed Description

This class is available under a global characters variable.

Member Function Documentation

◆ DestroyCarriedResource()

bool DestroyCarriedResource ( string  characterId)
inline

Destroy the resource carried by a character.

Parameters
characterIdID of the character
Returns
true if successful, false otherwise (wrong ID, character isn't carrying anything)

◆ GetMorale()

float GetMorale ( string  characterId,
MoraleCategory  category 
)
inline

Get specific morale value for a character

Parameters
characterIdID of the character
categoryMorale category
Returns
Morale value
Exceptions
ArgumentOutOfRangeExceptionMorale category is invalid

◆ GetPilotMissionCount()

int GetPilotMissionCount ( string  characterId)
inline

Get the amount of flight missions a pilot has completed

Parameters
characterIdID of the character
Returns
Number of flight missions that a pilot has completed

◆ GetPilotSuccessfulMissionCount()

int GetPilotSuccessfulMissionCount ( string  characterId)
inline

Get the amount of successful flight missions a pilot has completed

Parameters
characterIdID of the character
Returns
Number of flight missions a pilot has completed that resulted in a success

◆ GetVoxelObjectId()

uint GetVoxelObjectId ( string  characterId)
inline

Retrieve a voxel object ID from a character.

Parameters
characterIdID of the character
Returns
Voxel object ID

◆ ModifyMorale() [1/2]

void ModifyMorale ( MoraleCategory  category,
float  delta 
)
inline

Modify morale of every character on the base.

Parameters
categoryMorale category
deltaValue to modify by

◆ ModifyMorale() [2/2]

void ModifyMorale ( string  characterId,
MoraleCategory  category,
float  delta 
)
inline

Modify morale of a single character.

Parameters
characterIdID of the character
categoryMorale category
deltaValue to modify by

◆ SetMorale() [1/2]

void SetMorale ( MoraleCategory  category,
float  value 
)
inline

Set specific morale value for every character

Parameters
categoryMorale category
valueValue of morale [-100 / 100]

◆ SetMorale() [2/2]

void SetMorale ( string  characterId,
MoraleCategory  category,
float  value 
)
inline

Set specific morale value for a specific character

Parameters
characterIdID of the character
categoryMorale category
valueValue of morale [-100 / 100]

◆ SetTemporaryMoraleState()

void SetTemporaryMoraleState ( string  characterId,
CharacterMoraleStateFlag  moraleStateFlag,
int  duration 
)
inline

Set a morale state for a temporary amount of time on a single character on the base

Parameters
characterIdId of character
moraleStateFlagMorale state flag
durationDuration of morale state

◆ TriggerEffect()

bool TriggerEffect ( string  characterId,
MoraleCategory  category 
)
inline

Trigger a breaking point effect associated with particular morale category.

Parameters
characterIdID of the character
categoryMorale category associated with the effect
Returns
true if the effect was triggered successfully, false otherwise