Endstar LUA API Documentation
Loading...
Searching...
No Matches
Sentry Class Reference

Base type that rotates to face a direction or object. More...

Public Member Functions

void Shoot (Context instigator)
 Trigger a scan to check if a valid target is in front. Will trigger the "OnHit" event depending on the result of the shot.
 
void EnableTrackingLaser (Context instigator)
 Enable visual tracking laser for this sentry.
 
void DisableTrackingLaser (Context instigator)
 Disable visual tracking laser for this sentry.
 
void SetDamagedState (Context instigator, int value)
 Sets the damage state using SentryDamageLevel as the value.
 
void SetFollowTarget (Context instigator, Context target)
 Set the target that the Sentry will face towards.
 
void SetLookDirection (Context instigator, float x, float y)
 Set the direction for the Sentry to rotate towards. Setting this removes any active follow target.
 
float GetLookPitch ()
 
float GetLookYaw ()
 
void SetRotationSpeed (Context instigator, float value)
 
float GetRotationSpeed ()
 
void SetShootDistance (Context instigator, float value)
 Set how far the sentry will scan in front of it for a valid target.
 
float GetShootDistance ()
 
void LookForward (Context instigator)
 Look forward and clear any active follow target. Shorthand for SetLookDirection(instigator, 0,0).
 
void LookBackward (Context instigator)
 Look backward and clear any active follow target. Shorthand for SetLookDirection(instigator, 0,180).
 
void LookUp (Context instigator)
 Look up and clear any active follow target.
 
void LookDown (Context instigator)
 Look down and clear any active follow target.
 
void LookLeft (Context instigator)
 Look left and clear any active follow target.
 
void LookRight (Context instigator)
 Look right and clear any active follow target.
 

Detailed Description

Base type that rotates to face a direction or object.

Member Function Documentation

◆ DisableTrackingLaser()

void DisableTrackingLaser ( Context instigator)

Disable visual tracking laser for this sentry.

Parameters
instigatorThe source context triggering this change

◆ EnableTrackingLaser()

void EnableTrackingLaser ( Context instigator)

Enable visual tracking laser for this sentry.

Parameters
instigatorThe source context triggering this change

◆ GetLookPitch()

float GetLookPitch ( )

◆ GetLookYaw()

float GetLookYaw ( )

◆ GetRotationSpeed()

float GetRotationSpeed ( )

◆ GetShootDistance()

float GetShootDistance ( )

◆ LookBackward()

void LookBackward ( Context instigator)

Look backward and clear any active follow target. Shorthand for SetLookDirection(instigator, 0,180).

Parameters
instigatorThe source context of this change.

◆ LookDown()

void LookDown ( Context instigator)

Look down and clear any active follow target.

Parameters
instigatorThe source context of this change.

◆ LookForward()

void LookForward ( Context instigator)

Look forward and clear any active follow target. Shorthand for SetLookDirection(instigator, 0,0).

Parameters
instigatorThe source context of this change.

◆ LookLeft()

void LookLeft ( Context instigator)

Look left and clear any active follow target.

Parameters
instigatorThe source context of this change.

◆ LookRight()

void LookRight ( Context instigator)

Look right and clear any active follow target.

Parameters
instigatorThe source context of this change.

◆ LookUp()

void LookUp ( Context instigator)

Look up and clear any active follow target.

Parameters
instigatorThe source context of this change.

◆ SetDamagedState()

void SetDamagedState ( Context instigator,
int value )

Sets the damage state using SentryDamageLevel as the value.

Parameters
instigatorThe source context of this change.
valueThe target damage state, using SentryDamageLevel

◆ SetFollowTarget()

void SetFollowTarget ( Context instigator,
Context target )

Set the target that the Sentry will face towards.

Parameters
instigatorThe source context of this change.
targetThe target context to face.

◆ SetLookDirection()

void SetLookDirection ( Context instigator,
float x,
float y )

Set the direction for the Sentry to rotate towards. Setting this removes any active follow target.

Parameters
instigator
xTarget pitch
yTarget yaw

◆ SetRotationSpeed()

void SetRotationSpeed ( Context instigator,
float value )

◆ SetShootDistance()

void SetShootDistance ( Context instigator,
float value )

Set how far the sentry will scan in front of it for a valid target.

Parameters
instigatorThe source context of this change.
valueScan distance

◆ Shoot()

void Shoot ( Context instigator)

Trigger a scan to check if a valid target is in front. Will trigger the "OnHit" event depending on the result of the shot.

Parameters
instigatorThe source context triggering this change