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.
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 overridden 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.
Increase Capture For Controlling Team: This function calculates the rate that a control point is captured. It is extra internal, so overriding it is not recommended. However, I thought a lot about a character class specific capture rate (like the Scout in TF2), or a magic buff that makes you capture faster, but it's really hard to support something like that without knowing the full context about the game. The best way I figure someone could do this is to override Increase Capture For Controlling Team with whatever logic they want in there for classes, or buffs, or whatever. This is technically "against the rules" because it's a Control Point Internal function, so I reserve the right to change its signature or how it functions in the future, which might break your overridden version. But I purposefully extracted this logic out into its own function knowing someone would want to do it eventually. It should be fairly safe to assume:
- This function always gets Delta Time
- Always sets Capture Percentage
- Always calls Evaluate Team Control before it returns.
I'm unlikely to change those assumptions in a future version, so if you follow them, it probably won't break.
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.