Public Member Functions | |
uint & | AIFlags () |
EnumAIFlags. | |
void | SetupAISpawnFlags () |
call after setting your actors spawnflags for them to take effect on the kAI | |
int & | AttackChance () |
0-100 | |
float & | AttackRange () |
squared | |
float & | MeleeRange () |
squared | |
float & | LeashRadius () |
squared | |
float & | SightRange () |
squared | |
float & | LoudRange () |
squared | |
float & | QuietRange () |
squared | |
float & | FlyHeight () |
squared | |
float & | SightFOV () |
in rads | |
int & | Agitation () |
0-300. 0-99=IDLE, 100-199=AGITATED, 200-300=CHASE | |
float & | AnimScalar () |
default = 1.0f | |
float & | BlendScalar () |
default = 10.0f | |
![]() | |
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. | |
kAngle & | Yaw () |
kAngle & | Pitch () |
kAngle & | Roll () |
kVec3 & | Origin () |
Position in world space. | |
kVec3 & | Scale () |
kVec3 & | PrevOrigin () |
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. | |
kVec3 & | Velocity () |
kVec3 & | Movement () |
kQuat & | Rotation () |
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 |
kAnimState & | AnimState () |
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. | |
Definition at line 1216 of file t1_scriptAPI.cpp.
int & kAI::Agitation | ( | ) |
0-300. 0-99=IDLE, 100-199=AGITATED, 200-300=CHASE
uint & kAI::AIFlags | ( | ) |
EnumAIFlags.
float & kAI::AnimScalar | ( | ) |
default = 1.0f
int & kAI::AttackChance | ( | ) |
0-100
float & kAI::AttackRange | ( | ) |
squared
float & kAI::BlendScalar | ( | ) |
default = 10.0f
float & kAI::FlyHeight | ( | ) |
squared
float & kAI::LeashRadius | ( | ) |
squared
float & kAI::LoudRange | ( | ) |
squared
float & kAI::MeleeRange | ( | ) |
squared
float & kAI::QuietRange | ( | ) |
squared
void kAI::SetupAISpawnFlags | ( | ) |
call after setting your actors spawnflags for them to take effect on the kAI
float & kAI::SightFOV | ( | ) |
in rads
float & kAI::SightRange | ( | ) |
squared