Class "EntityNPC"
Functions
AnimWalkFrame () {: aria-label='Functions' }
void AnimWalkFrame ( string HorizontalAnim, string VerticalAnim, float SpeedThreshold ) {: .copyable aria-label='Functions' }
CalcTargetPosition () {: aria-label='Functions' }
Vector CalcTargetPosition ( float DistanceLimit ) {: .copyable aria-label='Functions' }
CanBeDamagedFromVelocity () {: aria-label='Functions' }
boolean CanBeDamagedFromVelocity ( Vector Velocity ) {: .copyable aria-label='Functions' }
CanReroll () {: aria-label='Functions' }
boolean CanReroll ( ) {: .copyable aria-label='Functions' }
FireBossProjectiles () {: aria-label='Functions' }
EntityProjectile FireBossProjectiles ( int NumProjectiles, Vector TargetPos, float TrajectoryModifier, ProjectileParams Params ) {: .copyable aria-label='Functions' }
fire a number of projectiles, optionally targeting the player direction is randomized, or slightly randomized when targeting the player FallingAccelModifier can be used to make projectiles fall faster to the ground returns a pointer to the projectile spawned last (useful e.g. when NumProjectiles=1)
FireProjectiles () {: aria-label='Functions' }
void FireProjectiles ( Vector Pos, Vector Velocity, ProjectilesMode Mode, ProjectileParams Params ) {: .copyable aria-label='Functions' }
GetAliveEnemyCount () {: aria-label='Functions' }
int GetAliveEnemyCount ( ) {: .copyable aria-label='Functions' }
Used to redirect close door enemies to any enemies for friendly npcs.
GetBossColorIdx () {: aria-label='Functions' }
int GetBossColorIdx ( ) {: .copyable aria-label='Functions' }
???- note "Notes" This will return the boss color idx reduced by 1. To get the actual color as set in bosscolors.xml, add +1 to the result.
GetChampionColorIdx () {: aria-label='Functions' }
int GetChampionColorIdx ( ) {: .copyable aria-label='Functions' }
???- note "Notes" A list of Champion colors can be found here : ChampionColorIdx
GetPlayerTarget () {: aria-label='Functions' }
Entity GetPlayerTarget ( ) {: .copyable aria-label='Functions' }
if there are no modifiers (best friend) this will return the player
IsBoss () {: aria-label='Functions' }
boolean IsBoss ( ) {: .copyable aria-label='Functions' }
IsChampion () {: aria-label='Functions' }
boolean IsChampion ( ) {: .copyable aria-label='Functions' }
KillUnique () {: aria-label='Functions' }
void KillUnique ( ) {: .copyable aria-label='Functions' }
For entities with unique death animation, like Flush! vs poop enemies.
MakeChampion () {: aria-label='Functions' }
void MakeChampion ( int Seed ) {: .copyable aria-label='Functions' }
Forces a non champion to become a champion, resets hp to max hp.
???- note "Notes" Hard to use because there are millions of possible seeds to input here.Use Morph() to change the champion Color instead!
MakeSplat () {: aria-label='Functions' }
EntityEffect MakeSplat ( float Size ) {: .copyable aria-label='Functions' }
Morph () {: aria-label='Functions' }
boolean Morph ( EntityType , int Variant, int SubType, int ChampionColorIdx ) {: .copyable aria-label='Functions' }
Morph the current entity into another one. ChampionColorIdx can be used to turn the entity into a champion. Use :::lua -1
to turn it into a regular entity. A list of Champion colors can be found here : ChampionColorIdx
???- example "Example Code" This code turns an entity into a gaper.
PlaySound () {: aria-label='Functions' }
void PlaySound ( SoundEffect ID, float Volume, int FrameDelay, boolean Loop, float Pitch ) {: .copyable aria-label='Functions' }
QueryNPCsGroup () {: aria-label='Functions' }
EntityList QueryNPCsGroup ( int GroupIdx ) {: .copyable aria-label='Functions' }
QueryNPCsSpawnerType () {: aria-label='Functions' }
EntityList QueryNPCsSpawnerType ( EntityType SpawnerType, EntityType Type, boolean OnlyEnemies ) {: .copyable aria-label='Functions' }
QueryNPCsType () {: aria-label='Functions' }
EntityList QueryNPCsType ( EntityType Type, int Variant ) {: .copyable aria-label='Functions' }
ResetPathFinderTarget () {: aria-label='Functions' }
void ResetPathFinderTarget ( ) {: .copyable aria-label='Functions' }
ThrowSpider () {: aria-label='Functions' }
{: .static .tooltip .badge } {: .abp .tooltip .badge }
Variables
CanShutDoors {: aria-label='Variables' }
boolean CanShutDoors {: .copyable aria-label='Variables' }
ChildNPC {: aria-label='Variables' }
EntityNPC ChildNPC {: .copyable aria-label='Variables' }
EntityRef {: aria-label='Variables' }
GroupIdx {: aria-label='Variables' }
int GroupIdx {: .copyable aria-label='Variables' }
Used to identify multichunks groups.
I1 {: aria-label='Variables' }
int I1 {: .copyable aria-label='Variables' }
general usage ints for ai_
I2 {: aria-label='Variables' }
int I2 {: .copyable aria-label='Variables' }
same as m_I1
ParentNPC {: aria-label='Variables' }
EntityNPC ParentNPC {: .copyable aria-label='Variables' }
parent entity, for multi-entity NPCs like Larry Jr.
Pathfinder {: aria-label='Variables' }
PathFinder Pathfinder {: .copyable aria-label='Variables' }
ProjectileCooldown {: aria-label='Variables' }
int ProjectileCooldown {: .copyable aria-label='Variables' }
projectiles can fire again when it reaches 0
ProjectileDelay {: aria-label='Variables' }
int ProjectileDelay {: .copyable aria-label='Variables' }
>0: projectile will be fired in n frames
Scale {: aria-label='Variables' }
float Scale {: .copyable aria-label='Variables' }
State {: aria-label='Variables' }
int State {: .copyable aria-label='Variables' }
StateFrame {: aria-label='Variables' }
int StateFrame {: .copyable aria-label='Variables' }
V1 {: aria-label='Variables' }
Vector V1 {: .copyable aria-label='Variables' }
general usage for ai_* functions, initialized to (0,0)
V2 {: aria-label='Variables' }
Vector V2 {: .copyable aria-label='Variables' }
like m_V1, in case we need two of those
Last updated