45422 {
45423
45424
45425
45426
45427
45428
45429
45430
45431
45432
45433
45434
45435
45436
45437
45438
45439
45440
45441
45442
45443
45444
45445
45446
45447
45448
45450 {
45453 }
45456 {
45459 }
45461 {
45465 {
45467 }
45468 return;
45469 }
45473 for (int i = 0; i < 200; i++)
45474 {
45475 if (Main.npc[i].active && Main.npc[i].type ==
type && i !=
whoAmI)
45476 {
45477 Vector2
vector = Main.npc[i].Center -
base.Center;
45479 {
45483 velocity.X -= vector.X * 1
f;
45484 }
45485 }
45486 }
45487 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Vector2 position
The position of this Entity in world coordinates.
static readonly SoundStyle NPCHit6
float[] localAI
Acts like F:Terraria.NPC.ai, but does not sync to the server. Many vanilla T:Terraria....
void TargetClosest(bool faceTarget=true)
NPCAimedTarget GetTargetData(bool ignorePlayerTankPets=true)
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....
int alpha
0 is opaque, and 255 is transparent. Note that this is the opposite of how alpha is typically express...
int StrikeNPCNoInteraction(int Damage, float knockBack, int hitDirection)