GameStatList

v4.0

Variables

Forcing posts to Blackboard

While each Stat object can post it's information to the Blackboard, it may not be ideal to have all actors with Stat data doing so, especially in projects with many enemies. The values of these bools are false, but if set true, then Stats in this GameStatList will post their data to Blackboard, only for this list.

// If true, objects will post to blackboard even if they are individual 
// set to not post
public bool forcePostToBlackboard = false; 

// If true, when objects post, they will be forced to notify followers of the 
// blackboard
public bool forceNotifyOnPost = false; 

// Example
public void YourActorStartActions()
{
    //  Ensure the GameStatList stats and GameStatList skills post to blackboard
    stats.forcePostToBlackboard = true;
    stats.forceNotifyOnPost = true;
    skills.forcePostToBlackboard = true;
    skills.forceNotifyOnPost = true;
    
    // Other Start Actions
}

Returns Dictionary<string, float> with the Point value for all "Counter" stats, or all GameStats in the list. Counter stats are those which can't be trained or modified. By default only the Point value will be returned. Optionally include BaseValue as well.

/* Optional parameters
bool keyIsObjectName = true // if false, key will be Uid()
bool countersOnly = true // if false, all stats will be included
bool includeBaseValue = false // if true, return will include Points + BaseValue
*/

var allCounters = gameStatList.GetAllPoints();
var counterPointsAndBaseValue = gameStatList.GetAllPoints(true, true, true);

Last updated