Turok
 
Loading...
Searching...
No Matches
kPuppet Class Reference
Inheritance diagram for kPuppet:
kActor

Public Member Functions

float & ViewHeight ()
 set from the players def "player.viewHeight". Origin.z + ViewHeight() + LandingViewOffset() = Cameras position.
 
float & RecoilPitch ()
 used for weapon recoil that modifies the players pitch.
 
const float LandingViewOffset () const
 LandingViewOffset changes when jumping and falling. Origin.z + ViewHeight() + LandingViewOffset() = Cameras position.
 
uint & PlayerFlags ()
 EnumPlayerFlags.
 
void QuietNoiseAlert ()
 
void LoudNoiseAlert ()
 
void SetGroundForwardSpeed (const float speed)
 default = 10.24f
 
void SetGroundBackwardSpeed (const float speed)
 default = -10.24f
 
void SetGroundStrafeSpeed (const float speed)
 default = 10.24f
 
void SetGroundForwardAccel (const float accel)
 default = 0.05f
 
void SetGroundBackwardAccel (const float accel)
 default = 0.05f
 
void SetGroundStrafeAccel (const float accel)
 default = 0.05f
 
void SetGroundDeaccel (const float accel)
 default = 0.5f
 
void SetSwimForwardSpeed (const float speed)
 default = 10.24f
 
void SetSwimBackwardSpeed (const float speed)
 default = -10.24f
 
void SetSwimStrafeSpeed (const float speed)
 default = 10.24f
 
void SetSwimForwardAccel (const float accel)
 default = 0.05f
 
void SetSwimBackwardAccel (const float accel)
 default = 0.05f
 
void SetSwimStrafeAccel (const float accel)
 default = 0.05f
 
void SetSwimDeaccel (const float accel)
 default = 0.5f
 
void SetJumpMinSpeed (const float speed)
 default = GAME_SCALE * 0.855f
 
void SetJumpMaxSpeed (const float speed)
 default = GAME_SCALE * 1.667f
 
void SetJumpClimbSpeed (const float speed)
 default = GAME_SCALE * 0.2875f
 
void SetOverrideShadow (const int value)
 0=none(default), 1=Force Disable shadow, 2=Force Enable shadow
 
void SetOverrideWalkRun (const int value)
 0=none(default), 1=Force Disable Walk
 
float & Oxygen ()
 Time in seconds. 0: full oxygen. >= 55: shows air bar. >= 70: OxygenOut is set to true.
 
bool & OxygenOut ()
 if true will damage player if underwater
 
float & OverrideFOV ()
 set to 1-179. anything else will stop overriding the fov and will use the r_fov cvar.
 
void SetCrawl (const bool crawl)
 use this to manually set if the player is crawling instead of setting PF_CRAWLING directly.
 
const float GroundForwardSpeed () const
 default = 10.24f
 
const float GroundBackwardSpeed () const
 default = -10.24f
 
const float GroundStrafeSpeed () const
 default = 10.24f
 
const float GroundForwardAccel () const
 default = 0.05f
 
const float GroundBackwardAccel () const
 default = 0.05f
 
const float GroundStrafeAccel () const
 default = 0.05f
 
const float GroundDeaccel () const
 default = 0.5f
 
const float SwimForwardSpeed () const
 default = 10.24f
 
const float SwimBackwardSpeed () const
 default = -10.24f
 
const float SwimStrafeSpeed () const
 default = 10.24f
 
const float SwimForwardAccel () const
 default = 0.05f
 
const float SwimBackwardAccel () const
 default = 0.05f
 
const float SwimStrafeAccel () const
 default = 0.05f
 
const float SwimDeaccel () const
 default = 0.5f
 
const float JumpMinSpeed () const
 default = GAME_SCALE * 0.855f
 
const float JumpMaxSpeed () const
 default = GAME_SCALE * 1.667f
 
const float ClimbJumpAmount () const
 default = GAME_SCALE * 0.2875f
 
const int OverrideShadow () const
 default = 0
 
const int OverrideWalkRun () const
 default = 0
 
const int GetState (void) const
 EnumPlayerStates.
 
- Public Member Functions inherited from kActor
const bool IsStale () const
 Actor is marked as removed and is waiting to be freed from memory when it next checks if there are no more references to this actor.
 
kAngleYaw ()
 
kAnglePitch ()
 
kAngleRoll ()
 
kVec3Origin ()
 Position in world space.
 
kVec3Scale ()
 
kVec3PrevOrigin ()
 
void SetTarget (kActor@ actor)
 
kActor GetTarget ()
 
void SetSector (const uint sectorIndex)
 
void Remove ()
 Removes the actor and sets stale to true. Actor will only internally be removed when there are no references to this actor.
 
kVec3Velocity ()
 
kVec3Movement ()
 
kQuatRotation ()
 
int16 & Health ()
 
int & Type ()
 The actors Type ID.
 
int & ImpactType ()
 EnumImpactType.
 
bool & IgnoreSectorHeightChange (void)
 if true will not change position(or velocity and movement) when sector height changes.
 
int & ModelVariation ()
 
int & SpeciesMask ()
 
uint & Flags ()
 EnumActorFlags.
 
const uint SpawnFlags1 () const
 EnumActorSpawnFlags1.
 
const uint SpawnFlags2 () const
 EnumActorSpawnFlags2.
 
const uint SpawnFlags3 () const
 EnumActorSpawnFlags3.
 
const int TID () const
 
float & Radius ()
 
float & Height ()
 
float & StepHeight ()
 AKA Dead Height. Used for moving up steps, figuring out if in waterheight, and the height of the actor when they are dead so you can still shoot them.
 
float & WallRadius ()
 
float & Gravity ()
 
float & Friction ()
 
float & AnimSpeed ()
 
float & BounceDamp ()
 
float & FloorHeight ()
 
float & CeilingHeight ()
 
const int SectorIndex ()
 
const int AreaID () const
 
bool InstanceOf (const kStr &in className) const
 example: InstanceOf("kexPuppet")
 
void PlaySound (const kStr &in soundPath)
 
void PlaySoundWithLookupID (const int soundID)
 
void StopSound ()
 
void StopLoopingSounds ()
 
const int GameTicks () const
 
kAnimStateAnimState ()
 
kRenderModel RenderModel ()
 
const bool InWater () const
 
bool CheckPosition (const kVec3 &in origin)
 checks if the actor can move to this location
 
bool CheckPosition (const float angle, const float distance)
 calls CheckPosition(kVec3 origin) with location being: Actor.Origin() + (angle*distance*actor.Radius())
 
float GetTurnYaw (const kVec3 &in lookAtLocation) const
 
float GetAvoidanceAngle (const kVec3 &in lookAtLocation, const float distance)
 
const float GetWaterHeight () const
 
const bool CanSee (kActor@ actor, const uint excludeClipFlags=0)
 excludeClipFlags to ignore/disable (EnumClipFlags)
 
uint & ClipFlags ()
 EnumClipFlags.
 
kDictMem Definition ()
 get actors def data
 
bool OnGround () const
 
int GetWaterLevel () const
 EnumWaterLevel.
 
kActor CastToActor ()
 Casts to a kActor. Only used for kPuppet Actor().
 
kAI CastToAI ()
 Casts to kAI. returns null if isn't a kAI.
 
void SpawnProjectile (const kStr &in fxPath, const kVec3 &in pos, const kVec3 &in targetLocation, const float maxAngle)
 
void MeleeObject (const kStr &in damageType, const kVec3 &in offset, const float radius)
 
void SpawnFx (const kStr &in fxPath, const kVec3 &in pos)
 
void SpawnFx (const kStr &in fxPath, const kVec3 &in pos, const kQuat &in rot)
 
kVec3 GetTransformedVector (const kVec3 &in vector)
 
float DistanceToPoint (const kVec3 &in point) const
 calls DistanceToPoint(x,y,z)
 
float DistanceToPoint (const float x, const float y, const float z) const
 actors point is in the center
 
void InflictGenericDamage (kActor@ inflictor, const int damage)
 
void InflictDamage (kActor@ inflictor, const kStr &in damageDef)
 
void InteractActorsAtPosition (const kVec3 &in pos, const kStr &in callbackFunc, const float arg1=0, const float arg2=0, const float arg3=0, const float arg4=0)
 
kScriptObject ScriptObject ()
 
void MoveToPosition (const float x, const float y)
 Moves the world object to a desired position at xy coordinates. Movement will use hitscan collision for quick collision tests.
 
bool RandomDecision (const int randomBit) const
 randomBit should be >= 2. if a random value has the bit set and actors GameTicks also has the bit set then returns true.
 
void SetPosition (const kVec3 &in pos)
 best way to set an actors position, will also set the sector and clearinterpolation
 
const int16 SpawnParams (const int paramID) const
 Get a map actors param value.
 
const float GetCeilingHeight () const
 calculates the ceiling height from the actors sector and origin. Returns 0 if not in a sector.
 
const float GetFloorHeight () const
 calculates the floor height from the actors sector and origin. Returns 0 if not in a sector.
 
void RunFxEvent (const kStr &in fxEventName)
 Runs an ActorFX event. Example: RunFxEvent("Enemy_Freeze");.
 
const int GetSectorIndexAtLocation (const kVec3 &in pos, uint excludeClipFlags=0)
 excludeClipFlags to ignore/disable (EnumClipFlags)
 
void MarkPersistentBit (const bool clear)
 
const bool IsPersistentMarked ()
 
void SetHeadTrackTarget (kActor@ actor)
 
void ClearInterpolation ()
 
void AutomapToggle (const bool show)
 Use with Game.AutomapCustom(true);.
 
void SetAutomapColor (const int r, const int g, const int b)
 
void SetSpawnParams (const int param, const int16 value)
 Sets the actors param value. all params are int16.
 
void SetSpawnFlags1 (const uint flags)
 EnumActorSpawnFlags1.
 
void SetSpawnFlags2 (const uint flags)
 EnumActorSpawnFlags2.
 
void SetSpawnFlags3 (const uint flags)
 EnumActorSpawnFlags3.
 
void SetupSpawnParams ()
 call after setting your actors spawnflags for them to take effect on the kActor
 
void SetCustomDeadHeight (const bool bUse, const float height)
 Height of actor when they are dead. Only for non map actors. (actors spawned with ActorFactory)
 
const float GetCustomDeadHeight ()
 
const bool GetUsingCustomDeadHeight ()
 
const bool OverridingKeyTouchTID ()
 used only for key pickups
 
const int16 GetOverrideKeyTouchTID ()
 used only for key pickups
 
void OverrideKeyTouchTID (const bool bOverride, const int16 tid)
 used only for key pickups to tell what key it is in the hub
 
bool & SkipKeyTouchCinema ()
 used only for key pickups
 
void SetModel (kStr &in modelFile, kStr &in animFile)
 a way to set the model/anim for actors that had no model set previously
 
bool & TriggerInvincibility ()
 Can't damage if true. Gets set to true if enemy has trigger anim and false when activated.
 
void GetBoundsMinMax (kVec3 &out min, kVec3 &out max) const
 actor must not be sleeping and have a model set and not be a pickup. otherwise will return default min/max values of (-128, -128, -128) (128, 128, 128)
 
const int MapActorIndex () const
 Returns -1 if not a map actor.
 
int & DifficultyMode ()
 The difficulty this actor is currently set to.
 
void OverrideOnDamageValue (const int damage, const bool bOverride=true)
 call in OnPreDamage
 
bool & NoKnockBack ()
 Will not receive knock back movement from things like the alien weapon for example.
 
const float BaseHeight () const
 height of actor when spawned or when kAI regenerated
 
void RunAction (const int funcID, const float w=0.0f, const float x=0.0f, const float y=0.0f, const float z=0.0f)
 run a function on the actor defined in defs/animActions.txt
 
float & AirFriction ()
 default = 1.0f
 
float & WaterFriction ()
 default = 0.5f (same as Friction)
 
float & Mass ()
 default = GAME_SCALE * 1.0f
 
const float GetSkyHeight () const
 
bool & ChildOfTarget (void)
 if this actors Target is an actor that belongs to the owner of the Fx, explosion or melee attack then won't collide/get damaged.
 
kVec3 DamageOrigin (void) const
 The Origin point of the attacker (Fx, Actor, or null (returns this actors origin in that case)) who damaged this actor last. Gets set before OnPreDamage.
 
kVec3 DamageVelocity (void) const
 The Velocity of the attacker (Fx, Actor, or null (returns this actors velocity in that case)) who damaged this actor last. Gets set before OnPreDamage.
 
const bool CanSee (kPuppet@ puppet, const uint excludeClipFlags=0)
 excludeClipFlags to ignore/disable (EnumClipFlags). Note: This function that takes in the kPuppet arg is only available for kActor, not for kPuppet or kAI or kWeapon.
 

Detailed Description

Definition at line 1235 of file t1_scriptAPI.cpp.

Member Function Documentation

◆ ClimbJumpAmount()

const float kPuppet::ClimbJumpAmount ( ) const

default = GAME_SCALE * 0.2875f

◆ GetState()

const int kPuppet::GetState ( void ) const

EnumPlayerStates.

◆ GroundBackwardAccel()

const float kPuppet::GroundBackwardAccel ( ) const

default = 0.05f

◆ GroundBackwardSpeed()

const float kPuppet::GroundBackwardSpeed ( ) const

default = -10.24f

◆ GroundDeaccel()

const float kPuppet::GroundDeaccel ( ) const

default = 0.5f

◆ GroundForwardAccel()

const float kPuppet::GroundForwardAccel ( ) const

default = 0.05f

◆ GroundForwardSpeed()

const float kPuppet::GroundForwardSpeed ( ) const

default = 10.24f

◆ GroundStrafeAccel()

const float kPuppet::GroundStrafeAccel ( ) const

default = 0.05f

◆ GroundStrafeSpeed()

const float kPuppet::GroundStrafeSpeed ( ) const

default = 10.24f

◆ JumpMaxSpeed()

const float kPuppet::JumpMaxSpeed ( ) const

default = GAME_SCALE * 1.667f

◆ JumpMinSpeed()

const float kPuppet::JumpMinSpeed ( ) const

default = GAME_SCALE * 0.855f

◆ LandingViewOffset()

const float kPuppet::LandingViewOffset ( ) const

LandingViewOffset changes when jumping and falling. Origin.z + ViewHeight() + LandingViewOffset() = Cameras position.

◆ LoudNoiseAlert()

void kPuppet::LoudNoiseAlert ( )

◆ OverrideFOV()

float & kPuppet::OverrideFOV ( )

set to 1-179. anything else will stop overriding the fov and will use the r_fov cvar.

◆ OverrideShadow()

const int kPuppet::OverrideShadow ( ) const

default = 0

◆ OverrideWalkRun()

const int kPuppet::OverrideWalkRun ( ) const

default = 0

◆ Oxygen()

float & kPuppet::Oxygen ( )

Time in seconds. 0: full oxygen. >= 55: shows air bar. >= 70: OxygenOut is set to true.

◆ OxygenOut()

bool & kPuppet::OxygenOut ( )

if true will damage player if underwater

◆ PlayerFlags()

uint & kPuppet::PlayerFlags ( )

◆ QuietNoiseAlert()

void kPuppet::QuietNoiseAlert ( )

◆ RecoilPitch()

float & kPuppet::RecoilPitch ( )

used for weapon recoil that modifies the players pitch.

◆ SetCrawl()

void kPuppet::SetCrawl ( const bool crawl)

use this to manually set if the player is crawling instead of setting PF_CRAWLING directly.

◆ SetGroundBackwardAccel()

void kPuppet::SetGroundBackwardAccel ( const float accel)

default = 0.05f

◆ SetGroundBackwardSpeed()

void kPuppet::SetGroundBackwardSpeed ( const float speed)

default = -10.24f

◆ SetGroundDeaccel()

void kPuppet::SetGroundDeaccel ( const float accel)

default = 0.5f

◆ SetGroundForwardAccel()

void kPuppet::SetGroundForwardAccel ( const float accel)

default = 0.05f

◆ SetGroundForwardSpeed()

void kPuppet::SetGroundForwardSpeed ( const float speed)

default = 10.24f

◆ SetGroundStrafeAccel()

void kPuppet::SetGroundStrafeAccel ( const float accel)

default = 0.05f

◆ SetGroundStrafeSpeed()

void kPuppet::SetGroundStrafeSpeed ( const float speed)

default = 10.24f

◆ SetJumpClimbSpeed()

void kPuppet::SetJumpClimbSpeed ( const float speed)

default = GAME_SCALE * 0.2875f

◆ SetJumpMaxSpeed()

void kPuppet::SetJumpMaxSpeed ( const float speed)

default = GAME_SCALE * 1.667f

◆ SetJumpMinSpeed()

void kPuppet::SetJumpMinSpeed ( const float speed)

default = GAME_SCALE * 0.855f

◆ SetOverrideShadow()

void kPuppet::SetOverrideShadow ( const int value)

0=none(default), 1=Force Disable shadow, 2=Force Enable shadow

◆ SetOverrideWalkRun()

void kPuppet::SetOverrideWalkRun ( const int value)

0=none(default), 1=Force Disable Walk

◆ SetSwimBackwardAccel()

void kPuppet::SetSwimBackwardAccel ( const float accel)

default = 0.05f

◆ SetSwimBackwardSpeed()

void kPuppet::SetSwimBackwardSpeed ( const float speed)

default = -10.24f

◆ SetSwimDeaccel()

void kPuppet::SetSwimDeaccel ( const float accel)

default = 0.5f

◆ SetSwimForwardAccel()

void kPuppet::SetSwimForwardAccel ( const float accel)

default = 0.05f

◆ SetSwimForwardSpeed()

void kPuppet::SetSwimForwardSpeed ( const float speed)

default = 10.24f

◆ SetSwimStrafeAccel()

void kPuppet::SetSwimStrafeAccel ( const float accel)

default = 0.05f

◆ SetSwimStrafeSpeed()

void kPuppet::SetSwimStrafeSpeed ( const float speed)

default = 10.24f

◆ SwimBackwardAccel()

const float kPuppet::SwimBackwardAccel ( ) const

default = 0.05f

◆ SwimBackwardSpeed()

const float kPuppet::SwimBackwardSpeed ( ) const

default = -10.24f

◆ SwimDeaccel()

const float kPuppet::SwimDeaccel ( ) const

default = 0.5f

◆ SwimForwardAccel()

const float kPuppet::SwimForwardAccel ( ) const

default = 0.05f

◆ SwimForwardSpeed()

const float kPuppet::SwimForwardSpeed ( ) const

default = 10.24f

◆ SwimStrafeAccel()

const float kPuppet::SwimStrafeAccel ( ) const

default = 0.05f

◆ SwimStrafeSpeed()

const float kPuppet::SwimStrafeSpeed ( ) const

default = 10.24f

◆ ViewHeight()

float & kPuppet::ViewHeight ( )

set from the players def "player.viewHeight". Origin.z + ViewHeight() + LandingViewOffset() = Cameras position.