Skip to content
CISV2.0GET IT ON FAB

REFERENCEOBJECTS

UCISDetermineUseObjectTest

MODULECharacterInteractionSystemINCLUDEDetermineUseObjectTests/CISDetermineUseObjectTest.hPARENTUObject

A test that scores each tracked object for the character. Derive a Blueprint from it and override Calculate Object Score. The score of each test is multiplied by its Test Multiplier, the scores of all tests are added, and the object with the highest total becomes the best object for use. A score below 0 counts as 0.

Functions

AUTHORITY · server, every machineLOCAL · this machinePURE · read only
float CalculateObjectScore(ACharacter* InteractionCharacter, const UCISCharacterInteractionComponent* CharacterInteractionComponent, UCISInteractionObjectComponent* InteractionObjectComponent, UPARAM(ref) const FCISInteractionObjectSide& InteractionObjectSide, UPARAM(ref) float& CurrentScore) const
PURE

Returns the score of the object for this character, 0 or more. The default returns 0. CurrentScore is the total of the tests that ran before this one. Use Get Value from Curve to turn a distance or another number into a score.

Category
CIS|DetermineObjectTest
float GetValueFromCurve(float InTime) const
PURE

Returns the value at InTime of the external curve, when one is set, otherwise of the Calculation Curve of this test.

Category
CIS|DetermineObjectTest

Properties

FRuntimeFloatCurve CalculationCurve

The curve that GetValueFromCurve reads when no external curve is set.

Category
Settings
float TestMultiplier = 1.f

Multiplies the score of this test. The default is 1; 0 removes the test from the total.

Default
1.f
Category
Settings
bool bWithDebug = false

Shows the score, the multiplied score, the name of this test and the object on the screen, outside shipping builds. It also writes them to the Output Log (category CISLog), where they show only after the console command log CISLog Log: by default the category shows warnings only.

Default
false
Category
Settings|Debug
float DebugTime = 5.f

Seconds that the debug lines stay on the screen. Default 5.

Default
5.f
Category
Settings|Debug
FColor DebugColor = FColor::Yellow

The colour of the debug lines on the screen. Default yellow.

Default
FColor::Yellow
Category
Settings|Debug