Class "EntityNPC"⚓︎
Inherits from Class:⚓︎
Functions⚓︎
Anim·Walk·Frame ()⚓︎
void AnimWalkFrame ( string HorizontalAnim, string VerticalAnim, float SpeedThreshold )⚓︎
Calc·Target·Position ()⚓︎
Vector CalcTargetPosition ( float DistanceLimit )⚓︎
Can·Be·Damaged·From·Velocity ()⚓︎
boolean CanBeDamagedFromVelocity ( Vector Velocity )⚓︎
Can·Reroll ()⚓︎
boolean CanReroll ( )⚓︎
Fire·Boss·Projectiles ()⚓︎
EntityProjectile FireBossProjectiles ( int NumProjectiles, Vector TargetPos, float TrajectoryModifier, ProjectileParams Params )⚓︎
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)
Fire·Projectiles ()⚓︎
void FireProjectiles ( Vector Pos, Vector Velocity, ProjectilesMode Mode, ProjectileParams Params )⚓︎
Get·Alive·Enemy·Count ()⚓︎
int GetAliveEnemyCount ( )⚓︎
Used to redirect close door enemies to any enemies for friendly npcs.
Get·Boss·Color·Idx ()⚓︎
int GetBossColorIdx ( )⚓︎
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.
Get·Champion·Color·Idx ()⚓︎
int GetChampionColorIdx ( )⚓︎
Notes
A list of Champion colors can be found here : ChampionColorIdx
Get·Player·Target ()⚓︎
Entity GetPlayerTarget ( )⚓︎
if there are no modifiers (best friend) this will return the player
Is·Boss ()⚓︎
boolean IsBoss ( )⚓︎
Is·Champion ()⚓︎
boolean IsChampion ( )⚓︎
Kill·Unique ()⚓︎
void KillUnique ( )⚓︎
For entities with unique death animation, like Flush! vs poop enemies.
Make·Champion ()⚓︎
void MakeChampion ( int Seed )⚓︎
Forces a non champion to become a champion, resets hp to max hp.
Notes
Hard to use because there are millions of possible seeds to input here.Use Morph() to change the champion Color instead!
Make·Splat ()⚓︎
EntityEffect MakeSplat ( float Size )⚓︎
Morph ()⚓︎
boolean Morph ( EntityType , int Variant, int SubType, int ChampionColorIdx )⚓︎
Morph the current entity into another one. ChampionColorIdx can be used to turn the entity into a champion. Use -1
to turn it into a regular entity.
A list of Champion colors can be found here : ChampionColorIdx
Example Code
This code turns an entity into a gaper.
1 |
|
Play·Sound ()⚓︎
void PlaySound ( SoundEffect ID, float Volume, int FrameDelay, boolean Loop, float Pitch )⚓︎
Query·NPCs·Group ()⚓︎
EntityList QueryNPCsGroup ( int GroupIdx )⚓︎
Query·NPCs·Spawner·Type ()⚓︎
EntityList QueryNPCsSpawnerType ( EntityType SpawnerType, EntityType Type, boolean OnlyEnemies )⚓︎
Query·NPCs·Type ()⚓︎
EntityList QueryNPCsType ( EntityType Type, int Variant )⚓︎
Reset·Path·Finder·Target ()⚓︎
void ResetPathFinderTarget ( )⚓︎
Throw·Spider ()⚓︎
static ThrowSpider ( Vector Position, Entity Spawner, Vector TargetPos, boolean Big, float YOffset )⚓︎
Variables⚓︎
Can·Shut·Doors⚓︎
boolean CanShutDoors⚓︎
Child·NPC⚓︎
const EntityNPC ChildNPC⚓︎
Entity·Ref⚓︎
Entity EntityRef⚓︎
Group·Idx⚓︎
int GroupIdx⚓︎
Used to identify multichunks groups.
I1⚓︎
int I1⚓︎
general usage ints for ai_
I2⚓︎
int I2⚓︎
same as m_I1
Parent·NPC⚓︎
const EntityNPC ParentNPC⚓︎
parent entity, for multi-entity NPCs like Larry Jr.
Pathfinder⚓︎
PathFinder Pathfinder⚓︎
Projectile·Cooldown⚓︎
int ProjectileCooldown⚓︎
projectiles can fire again when it reaches 0
Projectile·Delay⚓︎
int ProjectileDelay⚓︎
>0: projectile will be fired in n frames
Scale⚓︎
float Scale⚓︎
State⚓︎
int State⚓︎
State·Frame⚓︎
int StateFrame⚓︎
V1⚓︎
Vector V1⚓︎
general usage for ai_* functions, initialized to (0,0)
V2⚓︎
Vector V2⚓︎
like m_V1, in case we need two of those