Wilson look cameras and omnipresence #267
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new entity called
point_wilson_camera
, which can act as an extra eye for Wilson. In addition, this PR integrates previously unfinished support for Wilson to be able to respond to Bad Cop from anywhere on the map. It also adds support for Wilson to look through the player's eyes directly.point_wilson_camera
A Wilson NPC can have one or multiple
point_wilson_camera
entities specified as "camera targets", which allow them to act as proxies for the Wilson NPC's senses. Each camera can have its own FOV and maximum look distance.When Wilson speaks in reference to a target (e.g. seeing an enemy, commenting on the player, etc.) while looking through a camera target, that camera will be added as a response criterion called
camera
. This can theoretically allow for camera-specific callouts.Omnipresence
The
Omnipresent
keyvalue andEnable
/DisableOmnipresence
inputs can be used to make Wilson bypass distance checks in speech targeting code. This is designed to be used when Wilson is stashed in his own room in the map and uses camera targets to see, and an omnipresent Wilson with camera targets specified will not use his own POV for visibility checks.This feature was previously named "omniscience", but that word is a misnomer for this functionality and has been tentatively renamed to "omnipresence", with counterparts for the new keyvalues and inputs added accordingly. The variable itself has not changed to avoid breaking saves.
"See through player" functionality
Wilson now has a keyvalue and inputs for seeing through the player's eyes. This acts similarly to camera targets, and may be useful for when external camera targets are not warranted.