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). | |
kAngle & | Yaw () |
Not used by the Fx. | |
kAngle & | Pitch () |
Not used by the Fx. | |
kAngle & | Roll () |
Not used by the Fx. | |
kVec3 & | Origin () |
kVec3 & | Scale () |
kVec3 & | PrevOrigin () |
void | SetTarget (kActor@ actor) |
kActor | GetTarget () |
void | SetSector (const uint sectorIndex) |
kVec3 & | Velocity () |
kVec3 & | Movement () |
kQuat & | Rotation () |
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 () |
kVec3 & | MuzzleOffset () |
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. | |
kVec3 & | 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. | |
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. | |
Definition at line 1406 of file t1_scriptAPI.cpp.
void kFx::AddCustomRef | ( | ) |
Keeps the Fx from getting freed from memory.
float & kFx::AirFriction | ( | ) |
const int kFx::AreaID | ( | ) | const |
const int kFx::BounceCount | ( | ) | const |
float & kFx::BounceDamp | ( | ) |
int & kFx::BulletBounces | ( | ) |
const bool kFx::CanSee | ( | kActor@ | actor, |
const uint | excludeClipFlags = 0 ) |
excludeClipFlags to ignore/disable (EnumClipFlags)
float & kFx::CeilingHeight | ( | ) |
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.
bool & kFx::ChildOfTarget | ( | ) |
Unused. Only used for kActors.
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.
void kFx::ClearInterpolation | ( | ) |
bool & kFx::DidWaterImpact | ( | ) |
const float kFx::Distance | ( | ) | const |
Distance to the center of the View (Player or Camera) at the time the Fx spawned.
float kFx::DistanceToPoint | ( | const float | x, |
const float | y, | ||
const float | z ) const |
Fx point is in the center.
float kFx::DistanceToPoint | ( | const kVec3 &in | point | ) | const |
calls DistanceToPoint(x,y,z)
bool & kFx::DoUpdateExpireCheck | ( | ) |
If set to false the Fx will not expire and get removed when lifetime is over.
bool & kFx::DoUpdateFading | ( | ) |
If set to false the Fx will not update color1 and color2 alpha value.
bool & kFx::DoUpdateMovement | ( | ) |
If set to false the Fx will not move.
bool & kFx::DoUpdateRotation | ( | ) |
If set to false the Fx will not update rotation offset.
bool & kFx::DoUpdateScaling | ( | ) |
If set to false the Fx will not update draw scale.
bool & kFx::DoUpdateSpriteAnimation | ( | ) |
If set to false the Fx will not update sprite frame.
bool & kFx::DoUpdateTickEvents | ( | ) |
If set to false the Fx will not call Tick or WaterTick events.
const bool kFx::DrawDelay | ( | ) | const |
float & kFx::DrawScale | ( | ) |
Current scale of the sprite.
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.
float & kFx::FloorHeight | ( | ) |
int & kFx::Frame | ( | ) |
The sprite frame. Make sure this value is < MaxFrames().
float & kFx::FrameTime | ( | ) |
The current time left before the Fx sprite tries going to the next frame in the sprite.
float & kFx::Friction | ( | ) |
kStr kFx::FxFilePath | ( | ) |
const int kFx::FxID | ( | ) | const |
const int kFx::FxIndex | ( | ) | const |
The index in the fx file array.
const int kFx::GameTicks | ( | ) | const |
const float kFx::GetCeilingHeight | ( | ) | const |
calculates the ceiling height from the Fx sector and origin. Returns 0 if not in a sector.
void kFx::GetColor1 | ( | float &out | r, |
float &out | g, | ||
float &out | b, | ||
float &out | a ) |
Get the color values.
void kFx::GetColor2 | ( | float &out | r, |
float &out | g, | ||
float &out | b, | ||
float &out | a ) |
Get the color values.
const float kFx::GetCurrentGameSpeed | ( | void | ) | const |
Gamespeed of this Fx (default 1.0f)
const float kFx::GetFloorHeight | ( | ) | const |
calculates the floor height from the Fx sector and origin. Returns 0 if not in a sector.
const float kFx::GetGameSpeed | ( | ) | const |
Returns CurrentGameSpeed if IgnoreGameSpeed is true else returns the CurrentGameSpeed * GlobalGameSpeed.
kActor kFx::GetOwnerAsActor | ( | ) |
kFx kFx::GetOwnerAsFx | ( | ) |
kFx kFx::GetParentFx | ( | ) |
const int kFx::GetSectorIndexAtLocation | ( | const kVec3 &in | pos, |
uint | excludeClipFlags = 0 ) |
excludeClipFlags to ignore/disable (EnumClipFlags)
const float kFx::GetSkyHeight | ( | ) | const |
kActor kFx::GetTarget | ( | ) |
const float kFx::GetWaterHeight | ( | ) | const |
int kFx::GetWaterLevel | ( | ) | const |
float & kFx::Gravity | ( | ) |
bool kFx::HasCustomRef | ( | ) | const |
float & kFx::Height | ( | ) |
(Default 8.0) Not really used. Only for searches for the fx to define it's bounding box.
bool & kFx::IgnoreGameSpeed | ( | ) |
GameSpeed used for this Fx will always be CurrentGameSpeed. (Default = false)
bool & kFx::IgnoreSectorHeightChange | ( | ) |
int & kFx::ImpactType | ( | ) |
int & kFx::ImpactTypeDmg | ( | ) |
EnumImpactType. Overrides the damage def used. if is -1 (default) then does not override ImpactType()
bool kFx::InfoActorInstance | ( | ) | const |
bool kFx::InfoAddOffset | ( | ) | const |
float kFx::InfoAirFriction | ( | ) | const |
float kFx::InfoAnimFriction | ( | ) | const |
kStr kFx::InfoAnimName | ( | ) | const |
Custom use.
int kFx::InfoAnimspeed | ( | ) | const |
int kFx::InfoAnimType | ( | ) | const |
bool kFx::InfoAttachSource | ( | ) | const |
kVec3 kFx::InfoBlackColor | ( | ) | const |
bool kFx::InfoBlood | ( | ) | const |
bool kFx::InfoBounceImpact | ( | ) | const |
float kFx::InfoBounceImpactThreshold | ( | ) | const |
float kFx::InfoBrightnessRandom | ( | ) | const |
bool kFx::InfoBullet | ( | ) | const |
bool kFx::InfoCrossFade | ( | ) | const |
bool kFx::InfoDecalOffset | ( | ) | const |
bool kFx::InfoDepthBuffer | ( | ) | const |
bool kFx::InfoDestroyOnWaterSurface | ( | ) | const |
bool kFx::InfoDrawDelay | ( | ) | const |
bool kFx::InfoDrawOnBottom | ( | ) | const |
int kFx::InfoDrawType | ( | ) | const |
int kFx::InfoFadeinTime | ( | ) | const |
bool kFx::InfoFadeout | ( | void | ) | const |
int kFx::InfoFadeoutTime | ( | ) | const |
bool kFx::InfoFlash | ( | ) | const |
float kFx::InfoForward | ( | ) | const |
float kFx::InfoFriction | ( | ) | const |
bool kFx::InfoFullScreen | ( | ) | const |
float kFx::InfoGravity | ( | ) | const |
float kFx::InfoHueRandom | ( | ) | const |
bool kFx::InfoIgnoreGameSpeed | ( | ) | const |
bool kFx::InfoImpactEffect | ( | ) | const |
bool kFx::InfoLensFlares | ( | ) | const |
int kFx::InfoLifetime | ( | ) | const |
float kFx::InfoMass | ( | ) | const |
int kFx::InfoMaxBulletBounces | ( | ) | const |
int kFx::InfoMaxInstances | ( | ) | const |
float kFx::InfoMaxscale | ( | ) | const |
kStr kFx::InfoModelName | ( | ) | const |
Custom use.
bool kFx::InfoMuzzleEffect | ( | ) | const |
kVec3 kFx::InfoMuzzleOffset | ( | ) | const |
bool kFx::InfoNoDirection | ( | ) | const |
bool kFx::InfoNoGroundSpawn | ( | ) | const |
bool kFx::InfoNoHitSource | ( | ) | const |
bool kFx::InfoNoSpawnFar | ( | ) | const |
bool kFx::InfoNoSpawnNear | ( | ) | const |
float kFx::InfoNoSpawnNearFarDist | ( | ) | const |
bool kFx::InfoNoWallSpawn | ( | ) | const |
kVec3 kFx::InfoOffset | ( | ) | const |
bool kFx::InfoOffsetFromFloor | ( | ) | const |
int kFx::InfoOnCollideActor | ( | ) | const |
int kFx::InfoOnCollideFloor | ( | ) | const |
int kFx::InfoOnCollideWall | ( | ) | const |
bool kFx::InfoOverrideMaxDrawScale | ( | ) | const |
bool kFx::InfoPerPolyCollision | ( | ) | const |
bool kFx::InfoProjectile | ( | ) | const |
int kFx::InfoRecurseLifetime | ( | ) | const |
float kFx::InfoRestart | ( | ) | const |
bool kFx::InfoRestrictAim | ( | ) | const |
float kFx::InfoRotationOffset | ( | ) | const |
float kFx::InfoRotationPivotX | ( | ) | const |
float kFx::InfoRotationPivotY | ( | ) | const |
float kFx::InfoRotationSpeed | ( | ) | const |
float kFx::InfoSaturationRandom | ( | ) | const |
float kFx::InfoScale | ( | ) | const |
float kFx::InfoScaleDest | ( | ) | const |
bool kFx::InfoScaleLerp | ( | ) | const |
bool kFx::InfoSparkle | ( | ) | const |
float kFx::InfoSpawnDistOffset | ( | ) | const |
bool kFx::InfoStickOnTarget | ( | ) | const |
bool kFx::InfoStopAnimOnImpact | ( | ) | const |
bool kFx::InfoTextureWrapMirrorHeight | ( | ) | const |
bool kFx::InfoTextureWrapMirrorWidth | ( | ) | const |
kVec3 kFx::InfoTranslation | ( | ) | const |
float kFx::InfoTranslationGlobalRandomScale | ( | ) | const |
int kFx::InfoUserID | ( | ) | const |
Custom use.
kStr kFx::InfoUserString | ( | ) | const |
Custom use.
int kFx::InfoVisibilityType | ( | ) | const |
float kFx::InfoWaterFriction | ( | ) | const |
bool kFx::InfoWeaponView | ( | ) | const |
kVec3 kFx::InfoWhiteColor | ( | ) | const |
const int kFx::InstanceIndex | ( | ) | const |
bool kFx::InstanceOf | ( | const kStr &in | className | ) | const |
example: InstanceOf("kexFx")
const int kFx::Instances | ( | ) | const |
Same as the instances value in the fx file.
bool kFx::InWater | ( | ) |
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).
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.
float & kFx::Mass | ( | ) |
float & kFx::MaxDrawScale | ( | ) |
The highest value the DrawScale() can become when the Fx is updating its scale OnTick.
const uint kFx::MaxFrames | ( | ) | const |
MaxFrames the sprite has. Frame should be < this value.
kVec3 & kFx::Movement | ( | ) |
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.
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.
float & kFx::MuzzleLifeTime | ( | ) |
kVec3 & kFx::MuzzleOffset | ( | ) |
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.
bool & kFx::OnCollideForceSetOriginToLast | ( | ) |
If set to true the Fx will set it's origin and sector to what it was before OnCollide was called.
bool kFx::OnGround | ( | ) | const |
kVec3 & kFx::Origin | ( | ) |
kAngle & kFx::Pitch | ( | ) |
Not used by the Fx.
void kFx::PlaySound | ( | const kStr &in | soundPath | ) |
void kFx::PlaySoundWithLookupID | ( | const int | soundID | ) |
kVec3 & kFx::PrevOrigin | ( | ) |
float & kFx::Radius | ( | ) |
(Default 8.0) Not really used. Only for searches for the fx to define it's bounding box.
float kFx::RadiusDamageFactor | ( | const kVec3 &in | origin, |
const float | radius ) const |
void kFx::RandomizeColors | ( | ) |
float & kFx::RecurseLifeTime | ( | ) |
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.
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.
const float kFx::Restart | ( | ) | const |
Current delay time before the Fx will start ticking.
kAngle & kFx::Roll | ( | ) |
Not used by the Fx.
kQuat & kFx::Rotation | ( | ) |
float & kFx::RotationOffset | ( | ) |
Current Rotation Offset around the Y Axis. kQuat(RotationOffset(), 0.0f, 1.0f, 0.0f);.
float & kFx::RotationSpeed | ( | ) |
Adds this value * (0.25 * GameSpeed) to RotationOffset() when updating rotation OnTick. This value is set on spawn.
kVec3 & kFx::Scale | ( | ) |
kScriptObjectFx kFx::ScriptObject | ( | ) |
const int kFx::SectorIndex | ( | ) |
void kFx::SetColor1 | ( | float | r, |
float | g, | ||
float | b, | ||
float | a ) |
Values range from 0.0 to 1.0. Color and alpha of sprite.
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.
void kFx::SetCurrentGameSpeed | ( | const float | speed | ) |
Set the Gamespeed of this Fx (default 1.0f)
void kFx::SetOwnerAsActor | ( | kActor@ | actor | ) |
void kFx::SetOwnerAsFx | ( | kFx@ | fx | ) |
void kFx::SetParentFx | ( | kFx@ | fx | ) |
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
void kFx::SetSector | ( | const uint | sectorIndex | ) |
void kFx::SetTarget | ( | kActor@ | actor | ) |
void kFx::SpawnImpactFx | ( | const int | impactType, |
const kVec3 &in | normal, | ||
const bool | bUseEvent = true, | ||
const bool | bBlood = true ) |
void kFx::SpawnWaterImpactFx | ( | ) |
float & kFx::Speed | ( | ) |
Initial forward moving speed, set on spawn from forwardSpeed and forwardSpeedRandom in the fx file.
void kFx::StopLoopingSounds | ( | ) |
void kFx::StopSound | ( | ) |
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.
kVec3 & kFx::Velocity | ( | ) |
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.
float & kFx::WallRadius | ( | ) |
float & kFx::WaterFriction | ( | ) |
kAngle & kFx::Yaw | ( | ) |
Not used by the Fx.