Part of TPG namespace
TPG.ControlPoint.CalculateCaptureSpeed(greenCount, redCount)📋 Has LDoc👁️ 0 viewsUpdated 1 month ago
Description
How fast a point captures, from who is standing on it. The signed head-count difference, clamped to TPG.Config.capMaxPlayers in both directions. Only the difference counts, so an evenly contested point returns 0 and does not move at all no matter how many are on it; and the clamp means stacking more than capMaxPlayers extra bodies buys nothing.
Parameters
| Name | Type | Description |
|---|---|---|
greenCount | number | Green players on the point. |
redCount | number | Red players on the point. |
Returns
| Type | Description |
|---|---|
number | Signed speed; positive captures toward green. |
Examples
No examples available.
Used In
No usages found in the codebase.