http://cp.greenstorm.net/index.php?title=Special:NewPages&feed=atom&hideredirs=1&limit=50&offset=&namespace=0&username=&tagfilter=&size-mode=max&size=0Control_Point - New pages [en]2024-03-28T08:25:06ZFrom Control_PointMediaWiki 1.32.0http://cp.greenstorm.net/index.php?title=Blueprint_FunctionsBlueprint Functions2020-06-14T19:40:49Z<p>Ecnassianer: /* Control Point Internals */</p>
<hr />
<div>This page documents all the public blueprint functions that you can safely use to manipulate a control point from your game code.<br />
<br />
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.<br />
<br />
==Control Point==<br />
'''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)<br />
<br />
'''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.<br />
<br />
'''ForceCaptureForTeam''': Force the control state of a point to a specific team regardless of who is capturing it.<br />
<br />
'''ControllingTeamOnPointCount''': The number of actors that belong to the controlling team that are currently on the point.<br />
<br />
'''GetCapturePercentage''': The percentage from 0 to 100 that a control point is captured.<br />
<br />
'''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.<br />
<br />
'''PrintStatus''': Handles updating debug text for capture status. This is called automatically in many places, but it is also available to you for debugging.<br />
<br />
'''GetExtraPlayersBonus''': Figures out how much faster the point captures for each additional capturing actor currently on the point. Override this for custom bonus behavior.<br />
<br />
==Control Point Internals==<br />
<br />
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.<br />
<br />
'''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.<br />
<br />
'''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.<br />
<br />
'''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. <br />
It should be fairly safe to assume:<br />
* This function always gets Delta Time<br />
* Always sets Capture Percentage<br />
* Always calls Evaluate Team Control before it returns. <br />
I'm unlikely to change those assumptions in a future version, so if you follow them, it probably won't break.<br />
<br />
==Control Point Teams==<br />
'''GetNumberOfTeams''': Returns the number of teams this control point is set up to be captured by.<br />
<br />
'''GetTeamColor''': Gets the team color of a particular team.<br />
<br />
'''Override Team''': An easy way to set the team arrays at runtime. See [[Overriding Team Management]]<br />
<br />
'''AddActorToTeam''': Adds an actor instance to one of the teams.<br />
<br />
'''Get Actor's Team''': Gets the team that an actor is on.<br />
<br />
'''CanActorCapture''': Returns true if the specified actor is cable to capture or block capture of this point.<br />
<br />
<br />
==Single Player Capture Point Dev Cheats==<br />
These functions do the same thing as the buttons in the property panel, but they can also be called programmatically.<br />
<br />
<br />
'''Add 10Percent''': Adds 10 percent to the current capture amount.<br />
<br />
'''Capture For Team 0''': Switch control of the point to Team 0.<br />
<br />
'''Capture for Team 1''': Switch control of the point to Team 1.<br />
<br />
'''Remove 10Percent''': Reduce the current capture amount by 10 percent.<br />
<br />
'''Toggle Locked''': Toggle whether the control point is locked or unlocked.<br />
<br />
'''Uncapture''': Switch control of the point to no one.<br />
<br />
'''Show Debug Display''': Turns on a text display that shows what team controls the point and what the capture percentage is.<br />
<br />
==Control Point Capture Results==<br />
<br />
'''UpdateMaterialParametersDuringConstructionScript''': If you override the construction script to register team colored dynamic material instances, call this after you're done to update them.<br />
<br />
'''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.</div>Ecnassianerhttp://cp.greenstorm.net/index.php?title=Super_easy_to_implementSuper easy to implement2020-06-14T19:21:56Z<p>Ecnassianer: Ecnassianer moved page Super easy to implement to Control Point Setup</p>
<hr />
<div>==Examples==<br />
Inside the Examples folder there is a map called ControlPointExampleMap that contains many different example setups. You're welcome to use these in your own game, or just reference them as you make your own.<br />
<br />
The simplest control point is BP_BasicControlPoint, and it is ready to be dropped in your game. Simply add GameplayTags, ActorInstances, or Classes to both teams for each point and you're ready to go.<br />
<br />
The UI folder also contains many examples of how to create UI that responds to control point states, but these UIs are pretty ugly, and meant only as an example for integrating control points into your own UI.<br />
<br />
==Quick Setup==<br />
<br />
To create a control point from scratch, you should <br />
# Create a Child blueprint of BP_ControlPointBase<br />
# Add geometry to the CaptureGeometry scene.<br />
# Create the appropriate number of teams and assign team colors.<br />
# Choose which method you want to use for assigning teams members (you can also mix and match):<br />
#* Actor instances is the simplest, simply add your actors to this array and they are on the team.<br />
#* A GameplayTag can be used for each team, and then simply assigned to all actors of that team.<br />
#* You can also assign a class type for each team. This is helpful if you already have different pawn types for each team.<br />
#* You can also [[Overriding Team Management|override the team adding function]] and assign teams programatically.<br />
# If you want your capture volume geometry to be team colored, assign their material instances to the Team Color Material Parameters<br />
# Place instances of your control points in a map.</div>Ecnassianer