This is the primary component for all energy related events. Read below for important info on energy functionality.

BPC Energy

TGiAR is built using a component based system, revolving around an asset called BPC Energy. This is the asset that contains information regarding an energy actors energy supply, and is responsible for delegating Energy Events, which are what allow actors to respond to being charged, drained, depleted, etc.

Instance Editable Features

Interacting with an energy actor is handled through the BPC_Energy component. This is a component attached to all actors, and possesses several editable details that are exposed for level designers to tweak on a by instance basis. Below are those details:


Supplies

These details control the size of the object’s energy tank. Despite being an array, all actors should only have one supply.

image.png

Variable Details:

Name: The name of the supply. This should remain BaseSupply.

Current Energy: How much energy should the actor start with.

Max Energy: The max amount of energy the supply can hold.

Can Overcharge: Whether or not the object can accept an additional amount of energy beyond it’s supply. This is used for enemies only and should remain false for all other reasons.

Player Interactable: Can the player directly interact with this object through the use of abilities or energy blasting.


Use / Generate Energy

Some energy actors have custom events that will allow them to generate or consume energy. These variables affect the amount and rate of that function.

image.png

Variable Details:

Use Energy Per Tick: How much energy is consumed or generated.

Energy Use Rate: How often a usage tick is fired.

Energy Use Type: Consume, Generate, or None.

NOTE: Not all energy actors have a special function that fires when they use energy, but all actors still have the capacity to consume or generate energy. This feature can be used to create timed events or energy actors that replenish themselves.


While Charged

IF an actor has an event that fires while it has energy, this controls the rate of that event. If they have no such event, this will do nothing.

image.png


API Reference

Get Energy Component


image.png

Description:

Inputs any actor and returns that actor’s energy component. NOTE: only use on actors you are sure are energy actors. To do this, include a branch checking for the BPI_EnergyComunication interface like so:

image.png


Get Total Energy

image.png

Description:

Returns the current amount of energy within that object. In the event that actor possess multiple supplies (such as the player), this will add all the energy within them together. If the actor just has one supply, it will return the amount of energy within that one supply.

Get Total Max Energy

image.png

Description:

Returns the max energy within an energy component (not including overcharge). If an actor has multiple supplies, it will add the max values together.

Can Any Supply Overcharge