Blueprint Functions

From Control_Point
Revision as of 11:44, 14 June 2020 by Ecnassianer (talk | contribs) (Single Player Capture Point Dev Cheats)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page documents all the public blueprint functions that you can safely use to manipulate a control point from your game code.

Functions in the "Control Point Internals" category are private functions that should only be used internally by the control point. Do not modify, or call them yourself. Some can be safely overriden to change the behavior of your child actors, but their call signature may change without warning in future versions.

Control Point

AddCapturingActor: Make an actor count as capturing this control point. Could be used to allow actors to capture from range (without colliding with the point)

RemoveCapturingActor: Remove an actor from the list of actors that are capturing a point. Might be useful to temporarily make an actor not count toward a capture.

ForceCaptureForTeam: Force the control state of a point to a specific team regardless of who is capturing it.

ControllingTeamOnPointCount: The number of actors that belong to the controlling team that are currently on the point.

GetCapturePercentage: The percentage from 0 to 100 that a control point is captured.

GetControllingTeamsColor: Gives the team color of the team currently in control of the point. If no team is in control, it returns 0,0,0,0.

PrintStatus: Handles updating debug text for capture status. This is called automatically in many places, but it is also available to you for debugging.

GetExtraPlayersBonus: Figures out how much faster the point captures for each additional capturing actor currently on the point. Override this for custom bonus behavior.

Control Point Internals

Functions in the "Control Point Internals" category are private functions that should only be used internally by the control point. Do not modify, or call them yourself. Some can be safely overriden to change the behavior of your child actors, but their call signature may change without warning in future versions. To add new behavior, it is better to respond to Control Point Events, only override these functions if you wish to replace existing behavior.

Drain Control Percentage: Called each frame a control point is having it's capture percentage drained. Override this to do something weird with draining. Sets the Capture Percentage variable.

Calculate Score: Calculates how much score is awarded per second for the controlling team. Override this to do something weird with points. Score is not the same as capture percentage.

Control Point Teams

GetNumberOfTeams: Returns the number of teams this control point is set up to be captured by.

GetTeamColor: Gets the team color of a particular team.

Override Team: An easy way to set the team arrays at runtime. See Overriding Team Management

AddActorToTeam: Adds an actor instance to one of the teams.

Get Actor's Team: Gets the team that an actor is on.

CanActorCapture: Returns true if the specified actor is cable to capture or block capture of this point.


Single Player Capture Point Dev Cheats

These functions do the same thing as the buttons in the property panel, but they can also be called programmatically.


Add 10Percent: Adds 10 percent to the current capture amount.

Capture For Team 0: Switch control of the point to Team 0.

Capture for Team 1: Switch control of the point to Team 1.

Remove 10Percent: Reduce the current capture amount by 10 percent.

Toggle Locked: Toggle whether the control point is locked or unlocked.

Uncapture: Switch control of the point to no one.

Show Debug Display: Turns on a text display that shows what team controls the point and what the capture percentage is.

Control Point Capture Results

UpdateMaterialParametersDuringConstructionScript: If you override the construction script to register team colored dynamic material instances, call this after you're done to update them.

RegisterTeamColoredDynamicMaterialInstance: A way to register which materials should have their Color parameter updated with the controlling team's color. CaptureGeometry is automatically registered, so you don't need to call this on them.