#
Parents classes
To quickly start using the plugin, create an actor with a shaped parent class. See the following
#
Shaped class
Shaped counter’s class are child classes of ECEntityCounter
that manipulate the construction script for you by adding a shape component as trigger area and set his collision response accordingly. This will allow you to directly use your counter without going through the construction script stage.
There is three shaped classes :
- ECCubicEntityCounter
- A counter with a
BoxComponent
as trigger zone. - ECCapletEntityCounter
- A counter with a
CapsuleComponent
as trigger zone. - ECSphericalEntityCounter
- A counter with a
SphereComponent
as trigger zone.
#
Generic counters
Using the ECEntityCounter
, you will be able to use any type of ShapeComponent as trigger zone (
even custom one you created
)!
To do so : add a component inheriting from the class UShapeComponent (UBoxComponent, USphereComponent, UYourCustonShape, YourCustomShapeComponent, ...).
Then call the SetUpCounter
metod in your construction script by passing the reference to your component to the method.
.. Or in the same way in C++ constructor method :
// LobbyVan.h
protected:
TObjectPtr<UBoxComponent> Box;
//...
// LobyVan.cpp
PSLobbyVan::PSLobbyVan()
{
//...
Box = CreateDefaultSubobject<UBoxComponent>(TEXT("Box"));
SetUpCounter(Box);
//...
}
This component will represent the area in which entities are counted. (This area will be called the trigger zone for the rest of this documentation)