Summary
Hooks
Hooks
cwCTO:CombineCameraFoundPlayer(combineCamera, player)
server gamemodes/cwhl2rp/plugins/cto/plugin/sv_plugin.lua:55Starts tracking a player a Combine camera has spotted, unless they are noclipping.
Parameters
- combineCamera Entity The camera that found the player
- player Player The player found
cwCTO:DispatchRequestSignal(player, text)
server gamemodes/cwhl2rp/plugins/cto/plugin/sv_plugin.lua:319Sends a request for assistance from a player to every Combine unit with a biosignal.
Plays the "all teams respond, code 3" radio call and sends the CombineRequestSignal Cable message, which marks the
player's position on the units' HUD for 60 seconds.
Parameters
- player Player The player requesting help
- text String The request text
Marks a Combine player's biosignal as lost and alerts the other units.
Sets the IsBiosignalGone shared var, adds a line to the Combine display and plays the
Overwatch lost-biosignal radio call with the digits of the unit's name to every other
Combine player with a biosignal.
Parameters
- player Player The unit that lost its biosignal
Implements hook HalfSecond
Called every half second; checks the camera targets for movement violations and networks the cameras.
An alert camera drops players more than 450 units away or out of sight, and flags
running, jumping, crouching or fallen players that are not Combine with a biosignal; a
flagged player makes the camera angry. The camera data, 0 for idle cameras, is sent to
every Combine player with a biosignal with the UpdateBiosignalCameraData Cable message; nothing
is sent while the map has no cameras.
Implements hook HUDPaintForeground
Called to paint the HUD foreground; draws the Combine biosignal overlay.
For Combine players, draws unit biosignal markers, requests for assistance, Combine cameras with the violations they see and, within 2048 units (three times that while zoomed), possible movement violations of other players. Markers near the centre of the screen show more detail.
Implements hook HUDPaintTopScreen
Called to paint the top of the screen; shows Combine players the socio-status and HUD objectives.
Called after the map entities are created; prepares every Combine camera on the map.
Called when an entity is created; prepares new Combine cameras.
Parameters
- entity Entity The new entity
cwCTO:PlayerRagdolled(player, state, ragdoll)
server gamemodes/cwhl2rp/plugins/cto/plugin/sv_plugin.lua:347Implements hook PlayerRagdolled
Called when a player is ragdolled; reports Combine units with a biosignal that are knocked out.
Parameters
- player Player The ragdolled player
- state Number The ragdoll state, a
RAGDOLL_*value - ragdoll Map The player's ragdoll data
cwCTO:PostPlayerSpawn(player, lightSpawn, changeClass, firstSpawn)
server gamemodes/cwhl2rp/plugins/cto/plugin/sv_plugin.lua:285Implements hook PostPlayerSpawn
Called after a player spawns; restores their biosignal and sends Combine their HUD objectives.
On the first spawn after the map loads, also enables the Combine cameras that do not start inactive and marks the cameras as fixed.
Parameters
- player Player The player that spawned
- lightSpawn Boolean Whether this was a light spawn
- changeClass Boolean Whether the player changed class
- firstSpawn Boolean Whether this is the character's first spawn
cwCTO:SafelyPrepareCamera(combineCamera)
server gamemodes/cwhl2rp/plugins/cto/plugin/sv_plugin.lua:24Hooks a Combine camera up to the biosignal system.
Routes the camera's OnFoundPlayer output to cwCTO:CombineCameraFoundPlayer through a
hidden __cwctohook entity, created on first use, and starts tracking the camera in
cwCTO.cameraData. Once cameras are fixed, cameras not created by the map are marked so
they are saved with the map.
Parameters
- combineCamera Entity The
npc_combine_camera
cwCTO:SetPlayerBiosignal(player, bEnable)
server gamemodes/cwhl2rp/plugins/cto/plugin/sv_plugin.lua:221Turns a Combine player's biosignal on or off.
Turning it on clears IsBiosignalGone and announces the found biosignal and its location
to all units; turning it off runs cwCTO:DoPostBiosignalLoss.
if cwCTO:SetPlayerBiosignal(player, false) == cwCTO.ERROR_ALREADY_DISABLED then
cw.player:Notify(player, L('CTO_BiosignalAlreadyOff'))
end
Parameters
- player Player The player
- bEnable Boolean Whether to turn the biosignal on
Returns
- Number
cwCTO.ERROR_NONEon success, otherwiseERROR_NOT_COMBINE,ERROR_ALREADY_ENABLEDorERROR_ALREADY_DISABLED
Updates the biosignal markers shown on the local player's HUD.
Drops expired requests (after 60 seconds) and markers of units that no longer count,
marks the remaining markers as lost and then refreshes the marker above every other living
Combine unit with a biosignal, unless the local player's own biosignal is gone. Lost
markers expire after 120 seconds. Called by Schema:AddCombineDisplayLine for every
uncoloured display line.