Turok
 
Loading...
Searching...
No Matches
kFx Class Reference

Public Member Functions

const bool IsStale () const
 Fx is marked as removed and is waiting to be freed from memory when it next checks if there are no more references to this fx (after OnTick is called).
 
kAngleYaw ()
 Not used by the Fx.
 
kAnglePitch ()
 Not used by the Fx.
 
kAngleRoll ()
 Not used by the Fx.
 
kVec3Origin ()
 
kVec3Scale ()
 
kVec3PrevOrigin ()
 
void SetTarget (kActor@ actor)
 
kActor GetTarget ()
 
void SetSector (const uint sectorIndex)
 
kVec3Velocity ()
 
kVec3Movement ()
 
kQuatRotation ()
 
int & ImpactType ()
 EnumImpactType.
 
int & ImpactTypeDmg ()
 EnumImpactType. Overrides the damage def used. if is -1 (default) then does not override ImpactType()
 
bool & IgnoreSectorHeightChange ()
 
float & Radius ()
 (Default 8.0) Not really used. Only for searches for the fx to define it's bounding box.
 
float & Height ()
 (Default 8.0) Not really used. Only for searches for the fx to define it's bounding box.
 
float & WallRadius ()
 
float & Gravity ()
 
float & Friction ()
 
float & BounceDamp ()
 
float & FloorHeight ()
 
float & CeilingHeight ()
 
const int SectorIndex ()
 
const int AreaID () const
 
bool InstanceOf (const kStr &in className) const
 example: InstanceOf("kexFx")
 
void PlaySound (const kStr &in soundPath)
 
void PlaySoundWithLookupID (const int soundID)
 
void StopSound ()
 
void StopLoopingSounds ()
 
const float GetWaterHeight () const
 
const bool CanSee (kActor@ actor, const uint excludeClipFlags=0)
 excludeClipFlags to ignore/disable (EnumClipFlags)
 
bool OnGround () const
 
int GetWaterLevel () const
 EnumWaterLevel.
 
float DistanceToPoint (const kVec3 &in point) const
 calls DistanceToPoint(x,y,z)
 
float DistanceToPoint (const float x, const float y, const float z) const
 Fx point is in the center.
 
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.
 
void SetPosition (const kVec3 &in pos, const bool clearInterpolation=true)
 best way to set an Fx position without knowing the sector, will also find/set the sector and optionally clear interpolation
 
const float GetCeilingHeight () const
 calculates the ceiling height from the Fx sector and origin. Returns 0 if not in a sector.
 
const float GetFloorHeight () const
 calculates the floor height from the Fx sector and origin. Returns 0 if not in a sector.
 
const int GetSectorIndexAtLocation (const kVec3 &in pos, uint excludeClipFlags=0)
 excludeClipFlags to ignore/disable (EnumClipFlags)
 
float & AirFriction ()
 
float & WaterFriction ()
 
float & Mass ()
 
const float GetSkyHeight () const
 
bool & ChildOfTarget ()
 Unused. Only used for kActors.
 
void LinkArea ()
 Links the Fx to an area node so that internally the fx can be found in quick searches (similar to a kd-tree). Use with Game.GetFxInBounds. Should only call whenever you set the actors Origin() directly and then want to call Game.GetFxInBounds right after. LinkArea will be called automatically in OnTick internally so outside of that case you never need to worry about calling this.
 
void CheckLinkArea ()
 If origin or radius changed since the last LinkArea then calls LinkArea else does nothing. Links the Fx to an area node so that internally the Fx can be found in quick searches (similar to a kd-tree). Use with Game.GetFxInBounds. Should only call whenever you set the actors Origin() directly and then want to call Game.GetFxInBounds right after. CheckLinkArea will be called automatically in OnTick internally so outside of that case you never need to worry about calling this.
 
void Remove ()
 Removes the Fx and sets stale to true. Fx will only internally be removed when there are no references to this Fx.
 
const int GameTicks () const
 
float RadiusDamageFactor (const kVec3 &in origin, const float radius) const
 
bool InWater ()
 
kScriptObjectFx ScriptObject ()
 
void ClearInterpolation ()
 
const bool DrawDelay () const
 
const float GetCurrentGameSpeed (void) const
 Gamespeed of this Fx (default 1.0f)
 
void SetCurrentGameSpeed (const float speed)
 Set the Gamespeed of this Fx (default 1.0f)
 
const float GetGameSpeed () const
 Returns CurrentGameSpeed if IgnoreGameSpeed is true else returns the CurrentGameSpeed * GlobalGameSpeed.
 
const int RefCount () const
 Returns the number of references there are to this Fx. If this Fx is stale and RefCount is 0 then it will be removed after the Fx ticks.
 
bool HasCustomRef () const
 
void AddCustomRef ()
 Keeps the Fx from getting freed from memory.
 
void ClearCustomRef ()
 Allows the Fx to get freed from memory if it has no references. This will be called automatically when level is unloaded.
 
const int BounceCount () const
 
float & RecurseLifeTime ()
 
bool & DidWaterImpact ()
 
bool & IgnoreGameSpeed ()
 GameSpeed used for this Fx will always be CurrentGameSpeed. (Default = false)
 
kActor GetOwnerAsActor ()
 
kFx GetOwnerAsFx ()
 
void SetOwnerAsActor (kActor@ actor)
 
void SetOwnerAsFx (kFx@ fx)
 
kFx GetParentFx ()
 
void SetParentFx (kFx@ fx)
 
kStr FxFilePath ()
 
kVec3MuzzleOffset ()
 
const float Distance () const
 Distance to the center of the View (Player or Camera) at the time the Fx spawned.
 
const float Restart () const
 Current delay time before the Fx will start ticking.
 
int & Frame ()
 The sprite frame. Make sure this value is < MaxFrames().
 
const uint MaxFrames () const
 MaxFrames the sprite has. Frame should be < this value.
 
float & DrawScale ()
 Current scale of the sprite.
 
float & DrawScaleDest ()
 When the Fx is updating its scale OnTick, the current draw scale will increase to this value in different ways depending if bScaleLerp is true in the fx file.
 
float & MaxDrawScale ()
 The highest value the DrawScale() can become when the Fx is updating its scale OnTick.
 
float & RotationOffset ()
 Current Rotation Offset around the Y Axis. kQuat(RotationOffset(), 0.0f, 1.0f, 0.0f);.
 
float & RotationSpeed ()
 Adds this value * (0.25 * GameSpeed) to RotationOffset() when updating rotation OnTick. This value is set on spawn.
 
kVec3VelocityOffset ()
 When Fx spawns this is set to the starting velocity of the Fx. And adds to velocity if bAddOffset is true. Has no other use.
 
void SetColor1 (float r, float g, float b, float a)
 Values range from 0.0 to 1.0. Color and alpha of sprite.
 
void SetColor2 (float r, float g, float b, float a)
 Values range from 0.0 to 1.0. Environment color of the sprite (used in shaders to blend color1 and color2 together). Alpha is always set to the same as Color1.
 
void GetColor1 (float &out r, float &out g, float &out b, float &out a)
 Get the color values.
 
void GetColor2 (float &out r, float &out g, float &out b, float &out a)
 Get the color values.
 
const bool SwapBloodColor () const
 Is true if fx has bBlood set to true and games blood menu option is set to Green(1). When RandomizeColors() is called which is done automatically when the Fx spawns.
 
float & Speed ()
 Initial forward moving speed, set on spawn from forwardSpeed and forwardSpeedRandom in the fx file.
 
float & MovingForce ()
 initial velocity.Length() value. if bBullet is true then while updating movement OnTick, if the velocity.length() of the fx is below MovingForce() * 0.65f then removes the Fx.
 
float & MuzzleLifeTime ()
 
const int Instances () const
 Same as the instances value in the fx file.
 
float & FrameTime ()
 The current time left before the Fx sprite tries going to the next frame in the sprite.
 
int & BulletBounces ()
 
const int FxIndex () const
 The index in the fx file array.
 
const int InstanceIndex () const
 
bool & DoUpdateTickEvents ()
 If set to false the Fx will not call Tick or WaterTick events.
 
bool & DoUpdateSpriteAnimation ()
 If set to false the Fx will not update sprite frame.
 
bool & DoUpdateRotation ()
 If set to false the Fx will not update rotation offset.
 
bool & DoUpdateScaling ()
 If set to false the Fx will not update draw scale.
 
bool & DoUpdateFading ()
 If set to false the Fx will not update color1 and color2 alpha value.
 
bool & DoUpdateMovement ()
 If set to false the Fx will not move.
 
bool & DoUpdateExpireCheck ()
 If set to false the Fx will not expire and get removed when lifetime is over.
 
bool & OnCollideForceSetOriginToLast ()
 If set to true the Fx will set it's origin and sector to what it was before OnCollide was called.
 
bool & OnCollideForceNoSetOriginToLast ()
 If set to true the Fx will never set it's origin and sector to what it was before OnCollide was called.
 
void SpawnImpactFx (const int impactType, const kVec3 &in normal, const bool bUseEvent=true, const bool bBlood=true)
 
void SpawnWaterImpactFx ()
 
void RandomizeColors ()
 
const int FxID () const
 
bool InfoFadeout (void) const
 
bool InfoStopAnimOnImpact () const
 
bool InfoOffsetFromFloor () const
 
bool InfoTextureWrapMirrorWidth () const
 
bool InfoTextureWrapMirrorHeight () const
 
bool InfoLensFlares () const
 
bool InfoBlood () const
 
bool InfoAddOffset () const
 
bool InfoDepthBuffer () const
 
bool InfoScaleLerp () const
 
bool InfoActorInstance () const
 
bool InfoNoDirection () const
 
bool InfoFlash () const
 
bool InfoProjectile () const
 
bool InfoDestroyOnWaterSurface () const
 
bool InfoStickOnTarget () const
 
bool InfoBullet () const
 
bool InfoWeaponView () const
 
bool InfoFullScreen () const
 
bool InfoDecalOffset () const
 
bool InfoNoSpawnNear () const
 
bool InfoNoSpawnFar () const
 
bool InfoOverrideMaxDrawScale () const
 
bool InfoIgnoreGameSpeed () const
 
bool InfoAttachSource () const
 
bool InfoDrawOnBottom () const
 
bool InfoSparkle () const
 
bool InfoCrossFade () const
 
bool InfoImpactEffect () const
 
bool InfoRestrictAim () const
 
bool InfoNoWallSpawn () const
 
bool InfoNoGroundSpawn () const
 
bool InfoNoHitSource () const
 
bool InfoPerPolyCollision () const
 
bool InfoMuzzleEffect () const
 
bool InfoDrawDelay () const
 
bool InfoBounceImpact () const
 
float InfoBounceImpactThreshold () const
 
float InfoNoSpawnNearFarDist () const
 
float InfoMass () const
 
float InfoTranslationGlobalRandomScale () const
 
kVec3 InfoTranslation () const
 
float InfoGravity () const
 
float InfoFriction () const
 
float InfoAirFriction () const
 
float InfoWaterFriction () const
 
float InfoAnimFriction () const
 
kVec3 InfoMuzzleOffset () const
 
float InfoScale () const
 
float InfoScaleDest () const
 
float InfoMaxscale () const
 
float InfoForward () const
 
kVec3 InfoOffset () const
 
float InfoRotationOffset () const
 
float InfoRotationSpeed () const
 
float InfoRotationPivotX () const
 
float InfoRotationPivotY () const
 
int InfoLifetime () const
 
int InfoRecurseLifetime () const
 
float InfoRestart () const
 
int InfoAnimspeed () const
 
int InfoOnCollideActor () const
 
int InfoOnCollideWall () const
 
int InfoOnCollideFloor () const
 
int InfoDrawType () const
 
int InfoAnimType () const
 
int InfoVisibilityType () const
 
kVec3 InfoWhiteColor () const
 
kVec3 InfoBlackColor () const
 
float InfoHueRandom () const
 
float InfoSaturationRandom () const
 
float InfoBrightnessRandom () const
 
int InfoFadeinTime () const
 
int InfoFadeoutTime () const
 
int InfoMaxBulletBounces () const
 
int InfoMaxInstances () const
 
float InfoSpawnDistOffset () const
 
kStr InfoModelName () const
 Custom use.
 
kStr InfoAnimName () const
 Custom use.
 
kStr InfoUserString () const
 Custom use.
 
int InfoUserID () const
 Custom use.
 

Detailed Description

Definition at line 1406 of file t1_scriptAPI.cpp.

Member Function Documentation

◆ AddCustomRef()

void kFx::AddCustomRef ( )

Keeps the Fx from getting freed from memory.

◆ AirFriction()

float & kFx::AirFriction ( )

◆ AreaID()

const int kFx::AreaID ( ) const

◆ BounceCount()

const int kFx::BounceCount ( ) const

◆ BounceDamp()

float & kFx::BounceDamp ( )

◆ BulletBounces()

int & kFx::BulletBounces ( )

◆ CanSee()

const bool kFx::CanSee ( kActor@ actor,
const uint excludeClipFlags = 0 )

excludeClipFlags to ignore/disable (EnumClipFlags)

◆ CeilingHeight()

float & kFx::CeilingHeight ( )

◆ CheckLinkArea()

void kFx::CheckLinkArea ( )

If origin or radius changed since the last LinkArea then calls LinkArea else does nothing. Links the Fx to an area node so that internally the Fx can be found in quick searches (similar to a kd-tree). Use with Game.GetFxInBounds. Should only call whenever you set the actors Origin() directly and then want to call Game.GetFxInBounds right after. CheckLinkArea will be called automatically in OnTick internally so outside of that case you never need to worry about calling this.

◆ ChildOfTarget()

bool & kFx::ChildOfTarget ( )

Unused. Only used for kActors.

◆ ClearCustomRef()

void kFx::ClearCustomRef ( )

Allows the Fx to get freed from memory if it has no references. This will be called automatically when level is unloaded.

◆ ClearInterpolation()

void kFx::ClearInterpolation ( )

◆ DidWaterImpact()

bool & kFx::DidWaterImpact ( )

◆ Distance()

const float kFx::Distance ( ) const

Distance to the center of the View (Player or Camera) at the time the Fx spawned.

◆ DistanceToPoint() [1/2]

float kFx::DistanceToPoint ( const float x,
const float y,
const float z ) const

Fx point is in the center.

◆ DistanceToPoint() [2/2]

float kFx::DistanceToPoint ( const kVec3 &in point) const

calls DistanceToPoint(x,y,z)

◆ DoUpdateExpireCheck()

bool & kFx::DoUpdateExpireCheck ( )

If set to false the Fx will not expire and get removed when lifetime is over.

◆ DoUpdateFading()

bool & kFx::DoUpdateFading ( )

If set to false the Fx will not update color1 and color2 alpha value.

◆ DoUpdateMovement()

bool & kFx::DoUpdateMovement ( )

If set to false the Fx will not move.

◆ DoUpdateRotation()

bool & kFx::DoUpdateRotation ( )

If set to false the Fx will not update rotation offset.

◆ DoUpdateScaling()

bool & kFx::DoUpdateScaling ( )

If set to false the Fx will not update draw scale.

◆ DoUpdateSpriteAnimation()

bool & kFx::DoUpdateSpriteAnimation ( )

If set to false the Fx will not update sprite frame.

◆ DoUpdateTickEvents()

bool & kFx::DoUpdateTickEvents ( )

If set to false the Fx will not call Tick or WaterTick events.

◆ DrawDelay()

const bool kFx::DrawDelay ( ) const

◆ DrawScale()

float & kFx::DrawScale ( )

Current scale of the sprite.

◆ DrawScaleDest()

float & kFx::DrawScaleDest ( )

When the Fx is updating its scale OnTick, the current draw scale will increase to this value in different ways depending if bScaleLerp is true in the fx file.

◆ FloorHeight()

float & kFx::FloorHeight ( )

◆ Frame()

int & kFx::Frame ( )

The sprite frame. Make sure this value is < MaxFrames().

◆ FrameTime()

float & kFx::FrameTime ( )

The current time left before the Fx sprite tries going to the next frame in the sprite.

◆ Friction()

float & kFx::Friction ( )

◆ FxFilePath()

kStr kFx::FxFilePath ( )

◆ FxID()

const int kFx::FxID ( ) const

◆ FxIndex()

const int kFx::FxIndex ( ) const

The index in the fx file array.

◆ GameTicks()

const int kFx::GameTicks ( ) const

◆ GetCeilingHeight()

const float kFx::GetCeilingHeight ( ) const

calculates the ceiling height from the Fx sector and origin. Returns 0 if not in a sector.

◆ GetColor1()

void kFx::GetColor1 ( float &out r,
float &out g,
float &out b,
float &out a )

Get the color values.

◆ GetColor2()

void kFx::GetColor2 ( float &out r,
float &out g,
float &out b,
float &out a )

Get the color values.

◆ GetCurrentGameSpeed()

const float kFx::GetCurrentGameSpeed ( void ) const

Gamespeed of this Fx (default 1.0f)

◆ GetFloorHeight()

const float kFx::GetFloorHeight ( ) const

calculates the floor height from the Fx sector and origin. Returns 0 if not in a sector.

◆ GetGameSpeed()

const float kFx::GetGameSpeed ( ) const

Returns CurrentGameSpeed if IgnoreGameSpeed is true else returns the CurrentGameSpeed * GlobalGameSpeed.

◆ GetOwnerAsActor()

kActor kFx::GetOwnerAsActor ( )

◆ GetOwnerAsFx()

kFx kFx::GetOwnerAsFx ( )

◆ GetParentFx()

kFx kFx::GetParentFx ( )

◆ GetSectorIndexAtLocation()

const int kFx::GetSectorIndexAtLocation ( const kVec3 &in pos,
uint excludeClipFlags = 0 )

excludeClipFlags to ignore/disable (EnumClipFlags)

◆ GetSkyHeight()

const float kFx::GetSkyHeight ( ) const

◆ GetTarget()

kActor kFx::GetTarget ( )

◆ GetWaterHeight()

const float kFx::GetWaterHeight ( ) const

◆ GetWaterLevel()

int kFx::GetWaterLevel ( ) const

◆ Gravity()

float & kFx::Gravity ( )

◆ HasCustomRef()

bool kFx::HasCustomRef ( ) const

◆ Height()

float & kFx::Height ( )

(Default 8.0) Not really used. Only for searches for the fx to define it's bounding box.

◆ IgnoreGameSpeed()

bool & kFx::IgnoreGameSpeed ( )

GameSpeed used for this Fx will always be CurrentGameSpeed. (Default = false)

◆ IgnoreSectorHeightChange()

bool & kFx::IgnoreSectorHeightChange ( )

◆ ImpactType()

int & kFx::ImpactType ( )

◆ ImpactTypeDmg()

int & kFx::ImpactTypeDmg ( )

EnumImpactType. Overrides the damage def used. if is -1 (default) then does not override ImpactType()

◆ InfoActorInstance()

bool kFx::InfoActorInstance ( ) const

◆ InfoAddOffset()

bool kFx::InfoAddOffset ( ) const

◆ InfoAirFriction()

float kFx::InfoAirFriction ( ) const

◆ InfoAnimFriction()

float kFx::InfoAnimFriction ( ) const

◆ InfoAnimName()

kStr kFx::InfoAnimName ( ) const

Custom use.

◆ InfoAnimspeed()

int kFx::InfoAnimspeed ( ) const

◆ InfoAnimType()

int kFx::InfoAnimType ( ) const

◆ InfoAttachSource()

bool kFx::InfoAttachSource ( ) const

◆ InfoBlackColor()

kVec3 kFx::InfoBlackColor ( ) const

◆ InfoBlood()

bool kFx::InfoBlood ( ) const

◆ InfoBounceImpact()

bool kFx::InfoBounceImpact ( ) const

◆ InfoBounceImpactThreshold()

float kFx::InfoBounceImpactThreshold ( ) const

◆ InfoBrightnessRandom()

float kFx::InfoBrightnessRandom ( ) const

◆ InfoBullet()

bool kFx::InfoBullet ( ) const

◆ InfoCrossFade()

bool kFx::InfoCrossFade ( ) const

◆ InfoDecalOffset()

bool kFx::InfoDecalOffset ( ) const

◆ InfoDepthBuffer()

bool kFx::InfoDepthBuffer ( ) const

◆ InfoDestroyOnWaterSurface()

bool kFx::InfoDestroyOnWaterSurface ( ) const

◆ InfoDrawDelay()

bool kFx::InfoDrawDelay ( ) const

◆ InfoDrawOnBottom()

bool kFx::InfoDrawOnBottom ( ) const

◆ InfoDrawType()

int kFx::InfoDrawType ( ) const

◆ InfoFadeinTime()

int kFx::InfoFadeinTime ( ) const

◆ InfoFadeout()

bool kFx::InfoFadeout ( void ) const

◆ InfoFadeoutTime()

int kFx::InfoFadeoutTime ( ) const

◆ InfoFlash()

bool kFx::InfoFlash ( ) const

◆ InfoForward()

float kFx::InfoForward ( ) const

◆ InfoFriction()

float kFx::InfoFriction ( ) const

◆ InfoFullScreen()

bool kFx::InfoFullScreen ( ) const

◆ InfoGravity()

float kFx::InfoGravity ( ) const

◆ InfoHueRandom()

float kFx::InfoHueRandom ( ) const

◆ InfoIgnoreGameSpeed()

bool kFx::InfoIgnoreGameSpeed ( ) const

◆ InfoImpactEffect()

bool kFx::InfoImpactEffect ( ) const

◆ InfoLensFlares()

bool kFx::InfoLensFlares ( ) const

◆ InfoLifetime()

int kFx::InfoLifetime ( ) const

◆ InfoMass()

float kFx::InfoMass ( ) const

◆ InfoMaxBulletBounces()

int kFx::InfoMaxBulletBounces ( ) const

◆ InfoMaxInstances()

int kFx::InfoMaxInstances ( ) const

◆ InfoMaxscale()

float kFx::InfoMaxscale ( ) const

◆ InfoModelName()

kStr kFx::InfoModelName ( ) const

Custom use.

◆ InfoMuzzleEffect()

bool kFx::InfoMuzzleEffect ( ) const

◆ InfoMuzzleOffset()

kVec3 kFx::InfoMuzzleOffset ( ) const

◆ InfoNoDirection()

bool kFx::InfoNoDirection ( ) const

◆ InfoNoGroundSpawn()

bool kFx::InfoNoGroundSpawn ( ) const

◆ InfoNoHitSource()

bool kFx::InfoNoHitSource ( ) const

◆ InfoNoSpawnFar()

bool kFx::InfoNoSpawnFar ( ) const

◆ InfoNoSpawnNear()

bool kFx::InfoNoSpawnNear ( ) const

◆ InfoNoSpawnNearFarDist()

float kFx::InfoNoSpawnNearFarDist ( ) const

◆ InfoNoWallSpawn()

bool kFx::InfoNoWallSpawn ( ) const

◆ InfoOffset()

kVec3 kFx::InfoOffset ( ) const

◆ InfoOffsetFromFloor()

bool kFx::InfoOffsetFromFloor ( ) const

◆ InfoOnCollideActor()

int kFx::InfoOnCollideActor ( ) const

◆ InfoOnCollideFloor()

int kFx::InfoOnCollideFloor ( ) const

◆ InfoOnCollideWall()

int kFx::InfoOnCollideWall ( ) const

◆ InfoOverrideMaxDrawScale()

bool kFx::InfoOverrideMaxDrawScale ( ) const

◆ InfoPerPolyCollision()

bool kFx::InfoPerPolyCollision ( ) const

◆ InfoProjectile()

bool kFx::InfoProjectile ( ) const

◆ InfoRecurseLifetime()

int kFx::InfoRecurseLifetime ( ) const

◆ InfoRestart()

float kFx::InfoRestart ( ) const

◆ InfoRestrictAim()

bool kFx::InfoRestrictAim ( ) const

◆ InfoRotationOffset()

float kFx::InfoRotationOffset ( ) const

◆ InfoRotationPivotX()

float kFx::InfoRotationPivotX ( ) const

◆ InfoRotationPivotY()

float kFx::InfoRotationPivotY ( ) const

◆ InfoRotationSpeed()

float kFx::InfoRotationSpeed ( ) const

◆ InfoSaturationRandom()

float kFx::InfoSaturationRandom ( ) const

◆ InfoScale()

float kFx::InfoScale ( ) const

◆ InfoScaleDest()

float kFx::InfoScaleDest ( ) const

◆ InfoScaleLerp()

bool kFx::InfoScaleLerp ( ) const

◆ InfoSparkle()

bool kFx::InfoSparkle ( ) const

◆ InfoSpawnDistOffset()

float kFx::InfoSpawnDistOffset ( ) const

◆ InfoStickOnTarget()

bool kFx::InfoStickOnTarget ( ) const

◆ InfoStopAnimOnImpact()

bool kFx::InfoStopAnimOnImpact ( ) const

◆ InfoTextureWrapMirrorHeight()

bool kFx::InfoTextureWrapMirrorHeight ( ) const

◆ InfoTextureWrapMirrorWidth()

bool kFx::InfoTextureWrapMirrorWidth ( ) const

◆ InfoTranslation()

kVec3 kFx::InfoTranslation ( ) const

◆ InfoTranslationGlobalRandomScale()

float kFx::InfoTranslationGlobalRandomScale ( ) const

◆ InfoUserID()

int kFx::InfoUserID ( ) const

Custom use.

◆ InfoUserString()

kStr kFx::InfoUserString ( ) const

Custom use.

◆ InfoVisibilityType()

int kFx::InfoVisibilityType ( ) const

◆ InfoWaterFriction()

float kFx::InfoWaterFriction ( ) const

◆ InfoWeaponView()

bool kFx::InfoWeaponView ( ) const

◆ InfoWhiteColor()

kVec3 kFx::InfoWhiteColor ( ) const

◆ InstanceIndex()

const int kFx::InstanceIndex ( ) const

◆ InstanceOf()

bool kFx::InstanceOf ( const kStr &in className) const

example: InstanceOf("kexFx")

◆ Instances()

const int kFx::Instances ( ) const

Same as the instances value in the fx file.

◆ InWater()

bool kFx::InWater ( )

◆ IsStale()

const bool kFx::IsStale ( ) const

Fx is marked as removed and is waiting to be freed from memory when it next checks if there are no more references to this fx (after OnTick is called).

◆ LinkArea()

void kFx::LinkArea ( )

Links the Fx to an area node so that internally the fx can be found in quick searches (similar to a kd-tree). Use with Game.GetFxInBounds. Should only call whenever you set the actors Origin() directly and then want to call Game.GetFxInBounds right after. LinkArea will be called automatically in OnTick internally so outside of that case you never need to worry about calling this.

◆ Mass()

float & kFx::Mass ( )

◆ MaxDrawScale()

float & kFx::MaxDrawScale ( )

The highest value the DrawScale() can become when the Fx is updating its scale OnTick.

◆ MaxFrames()

const uint kFx::MaxFrames ( ) const

MaxFrames the sprite has. Frame should be < this value.

◆ Movement()

kVec3 & kFx::Movement ( )

◆ MoveToPosition()

void kFx::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.

◆ MovingForce()

float & kFx::MovingForce ( )

initial velocity.Length() value. if bBullet is true then while updating movement OnTick, if the velocity.length() of the fx is below MovingForce() * 0.65f then removes the Fx.

◆ MuzzleLifeTime()

float & kFx::MuzzleLifeTime ( )

◆ MuzzleOffset()

kVec3 & kFx::MuzzleOffset ( )

◆ OnCollideForceNoSetOriginToLast()

bool & kFx::OnCollideForceNoSetOriginToLast ( )

If set to true the Fx will never set it's origin and sector to what it was before OnCollide was called.

◆ OnCollideForceSetOriginToLast()

bool & kFx::OnCollideForceSetOriginToLast ( )

If set to true the Fx will set it's origin and sector to what it was before OnCollide was called.

◆ OnGround()

bool kFx::OnGround ( ) const

◆ Origin()

kVec3 & kFx::Origin ( )

◆ Pitch()

kAngle & kFx::Pitch ( )

Not used by the Fx.

◆ PlaySound()

void kFx::PlaySound ( const kStr &in soundPath)

◆ PlaySoundWithLookupID()

void kFx::PlaySoundWithLookupID ( const int soundID)

◆ PrevOrigin()

kVec3 & kFx::PrevOrigin ( )

◆ Radius()

float & kFx::Radius ( )

(Default 8.0) Not really used. Only for searches for the fx to define it's bounding box.

◆ RadiusDamageFactor()

float kFx::RadiusDamageFactor ( const kVec3 &in origin,
const float radius ) const

◆ RandomizeColors()

void kFx::RandomizeColors ( )

◆ RecurseLifeTime()

float & kFx::RecurseLifeTime ( )

◆ RefCount()

const int kFx::RefCount ( ) const

Returns the number of references there are to this Fx. If this Fx is stale and RefCount is 0 then it will be removed after the Fx ticks.

◆ Remove()

void kFx::Remove ( )

Removes the Fx and sets stale to true. Fx will only internally be removed when there are no references to this Fx.

◆ Restart()

const float kFx::Restart ( ) const

Current delay time before the Fx will start ticking.

◆ Roll()

kAngle & kFx::Roll ( )

Not used by the Fx.

◆ Rotation()

kQuat & kFx::Rotation ( )

◆ RotationOffset()

float & kFx::RotationOffset ( )

Current Rotation Offset around the Y Axis. kQuat(RotationOffset(), 0.0f, 1.0f, 0.0f);.

◆ RotationSpeed()

float & kFx::RotationSpeed ( )

Adds this value * (0.25 * GameSpeed) to RotationOffset() when updating rotation OnTick. This value is set on spawn.

◆ Scale()

kVec3 & kFx::Scale ( )

◆ ScriptObject()

kScriptObjectFx kFx::ScriptObject ( )

◆ SectorIndex()

const int kFx::SectorIndex ( )

◆ SetColor1()

void kFx::SetColor1 ( float r,
float g,
float b,
float a )

Values range from 0.0 to 1.0. Color and alpha of sprite.

◆ SetColor2()

void kFx::SetColor2 ( float r,
float g,
float b,
float a )

Values range from 0.0 to 1.0. Environment color of the sprite (used in shaders to blend color1 and color2 together). Alpha is always set to the same as Color1.

◆ SetCurrentGameSpeed()

void kFx::SetCurrentGameSpeed ( const float speed)

Set the Gamespeed of this Fx (default 1.0f)

◆ SetOwnerAsActor()

void kFx::SetOwnerAsActor ( kActor@ actor)

◆ SetOwnerAsFx()

void kFx::SetOwnerAsFx ( kFx@ fx)

◆ SetParentFx()

void kFx::SetParentFx ( kFx@ fx)

◆ SetPosition()

void kFx::SetPosition ( const kVec3 &in pos,
const bool clearInterpolation = true )

best way to set an Fx position without knowing the sector, will also find/set the sector and optionally clear interpolation

◆ SetSector()

void kFx::SetSector ( const uint sectorIndex)

◆ SetTarget()

void kFx::SetTarget ( kActor@ actor)

◆ SpawnImpactFx()

void kFx::SpawnImpactFx ( const int impactType,
const kVec3 &in normal,
const bool bUseEvent = true,
const bool bBlood = true )

◆ SpawnWaterImpactFx()

void kFx::SpawnWaterImpactFx ( )

◆ Speed()

float & kFx::Speed ( )

Initial forward moving speed, set on spawn from forwardSpeed and forwardSpeedRandom in the fx file.

◆ StopLoopingSounds()

void kFx::StopLoopingSounds ( )

◆ StopSound()

void kFx::StopSound ( )

◆ SwapBloodColor()

const bool kFx::SwapBloodColor ( ) const

Is true if fx has bBlood set to true and games blood menu option is set to Green(1). When RandomizeColors() is called which is done automatically when the Fx spawns.

◆ Velocity()

kVec3 & kFx::Velocity ( )

◆ VelocityOffset()

kVec3 & kFx::VelocityOffset ( )

When Fx spawns this is set to the starting velocity of the Fx. And adds to velocity if bAddOffset is true. Has no other use.

◆ WallRadius()

float & kFx::WallRadius ( )

◆ WaterFriction()

float & kFx::WaterFriction ( )

◆ Yaw()

kAngle & kFx::Yaw ( )

Not used by the Fx.