Hunter: Difference between revisions

From GPhys Developer Community
Jump to navigation Jump to search
Created page with "= GPhys.Types.Objects.Hunter = thumb|right|300px|Hunter (placeholder image) '''GPhys.Types.Objects.Hunter''' is a three-legged synth that is large enough to be imposing but small enough to enter buildings. == Accessible Variables == ; NpcClass : Always returns "Combine". ; animator : The Animator controlling Hunter's animations. ; agent : The NavMeshAgent for pathfinding and movement. ; audioSource : The AudioSource for playing sounds. ; eyeBottom..."
 
No edit summary
Line 74: Line 74:
== Inherited from GNPC ==
== Inherited from GNPC ==


See [[GPhys.Abstracts.GNPC]] for inherited health, ragdoll, mind control, and utility methods.
See [[GNPC]] for inherited health, ragdoll, mind control, and utility methods.


----
----
''This page documents the Hunter NPC in GPhys.'
''This page documents the Hunter NPC in GPhys.'

Revision as of 01:50, 29 April 2026

GPhys.Types.Objects.Hunter

Hunter (placeholder image)

GPhys.Types.Objects.Hunter is a three-legged synth that is large enough to be imposing but small enough to enter buildings.

Accessible Variables

NpcClass
Always returns "Combine".
animator
The Animator controlling Hunter's animations.
agent
The NavMeshAgent for pathfinding and movement.
audioSource
The AudioSource for playing sounds.
eyeBottom, eyeTop
Transforms for the Hunter's lower and upper eyes.
flechetteBottom, flechetteTop
Transforms for flechette firing points.
flechetteMuzzleBottom, flechetteMuzzleTop
ParticleSystems for flechette muzzle effects.
leftFootIK, rightFootIK, hindFootIK
IK controllers for Hunter's feet.
moveType
Current movement mode (Default, Prowl, Canter, DontChange).
followPathType
Path following mode (Default, LookAtTarget, LookAtDestination, HandledElsewhere).
currentTarget
The current target Transform.
targetLookat
The position the Hunter is looking at.
turnSpeed
Body turning speed.
WalkSpeed, CanterSpeed, ProwlSpeed
Movement speeds for different gaits.
centreOfBoundries
Center of the Hunter's bounds.
chargeSpeed, chargeTurnSpeed
Speed and turn speed while charging.
isCharging
True if currently charging.
canMove
True if the Hunter can move.
isPlanted
True if the Hunter is planted (stationary for shooting).
isShooting
True if currently shooting.
plantedShootLength
Duration of planted shooting.
shootDelay
Delay between flechette shots.
lastShootEye
Alternates between top and bottom flechette.
lastShootTime
Time of last shot.
turnSpeedCurve
AnimationCurve for smooth turning.
detectionRange, loseTargetRange
Ranges for detecting and losing targets.
Alert, Angry, PreCharge, Idle, Gloat, FoundEnemy, FoundEnemyAck, Scan, FlankAnnounce, MeleeAnnounce, MeleeHit, TackleAnnounce, TackleHit, ChargeHitEnemy, ChargeHitWorld, Pain, Death, DefendStrider, HitByVehicle
Arrays of AudioClips for various events.
FireMinigun
AudioClip for minigun fire.
nearFarSourceManager
Manages near/far audio effects.
lastBoundCheck, boundCheckInterval
Timing for updating bounds.
currentFlechetteTarget
Current flechette target position.
flechetteMoveSpeed
Speed at which flechette target moves.
lastMeleeAnim
Tracks last melee animation used.
everSawTarget, lastSawTarget, timeToStartScanning
Target tracking variables.
lastScanSound, randomScanInterval
Scan sound timing.
lastCheckedForStrider
Timing for strider defense checks.
isDefendingStrider
True if defending a strider.
currentStriderThreat
Current strider threat object.
maxPlantShots, currentPlantShots
Plant shooting limits.
burstCooldown, maxShotsPerBurst
Burst fire control.

Accessible Functions

Update()
Main update loop for movement, aiming, and shooting.
AnimationUpdate()
Updates animation parameters.
Plant()
Plants the Hunter for stationary shooting.
ResetAnimationsMovement()
Resets movement animation state.
MeleeTarget(bool stingers)
Performs a melee attack (optionally with stingers).
DamageTarget(float damage)
Damages the current target.
ChargeAtTarget()
Initiates a charge attack.
HandleCharge()
Coroutine for handling the charge attack.
PlayClips(params AudioClip[] clips)
Plays a random clip from the given set.
PlayClip(AudioClip clip)
Plays a specific audio clip.
SetDestination(Vector3 destination, MoveType moveType, FollowPathType followPathType)
Sets the Hunter's movement destination and mode.
SetDefaultWalk(), SetProwl(), SetCanter()
Sets movement mode and animation.
ShootBothFlechettes(Quaternion direction)
Fires both flechettes in sequence.
ShootFlechette(bool top, Quaternion direction)
Fires a single flechette.
CanSee(Transform target)
Returns true if the Hunter can see the target.
LookAt(Vector3 position, int type, float turnSpeed = 0f)
Rotates eyes/body/both to look at a position.
HandleHunt()
Handles hunting behavior and combat logic.
GetCurrentState()
Returns the current state as a string.
HandleForceChangeState(string newState)
Forces a state change.
HandleStateChange()
Handles state transitions.
HandleMindControlCameraInput()
Handles camera input when mind controlled.

Inherited from GNPC

See GNPC for inherited health, ragdoll, mind control, and utility methods.


This page documents the Hunter NPC in GPhys.'