Terraria

NameTypeDescription

widthintThe width of the projectile's hitbox, in pixels.

heightintThe height of the projectile's hitbox, in pixels.

soundDelayintThe delay until the projectile's sound plays when initialized.

meleeboolWhether this projectile's damage is considered melee. Melee takes priority over ranged, which takes priority over magic. This means this is rarely used.

rangedboolWhether this projectile's damage is considered ranged. Melee takes priority over ranged, which takes priority over magic.

magicboolWhether this projectile's damage is considered magic. Melee takes priority over ranged, which takes priority over magic.

ownerHitCheckboolWhether or not the projectile needs line-of-effect between the owner and a potential target to hit it.

hideboolWhether to draw this projectile onscreen.

ignoreWaterboolWhether passing through water impedes this projectile at all.

hostileboolWhether this projectile is considered hostile, meaning it will harm players and NPCs marked as friendly.

lightfloatHow much light this projectile emits while active.

penetrateintHow many enemies the projectile will penetrate before disappearing.Default value: 1

tileCollideboolWhether this projectile ignores tile collisions, passing through them.Default value: true

aiStyleintThe behavior of this projectile while it exists in the world. See List of Projectile AI Styles for more information.

alphaintThe alpha blending applied to this projectile. 0 is fully opaque, while 255 is invisible.

typeintThe type value to refer to this kind of projectile. A value of -1 indicates this is a custom projectile. See List of Projectiles and Item & Projectile Tutorial for more information.Default value: -1

scalefloatA multiplier for how large to draw this projectile.Default value: 1f

timeLeftintThe time in frames before this projectile disappears. Remember that there are 60 frames in one second. A value of 3600 for example, would be a full minute.Default value: 3600

namestringThe name of the projectile expressed as a string. Note that the only time it is displayed ingame is when it kills a player, and written in the death message (and possibly on a tombstone as well).Default value: "Unnamed"

friendlyboolWhether this projectile is considered friendly, meaning it will not harm players and NPCs marked as friendly.

damageintHow much damage this projectile does when it collides with a valid target.

knockBackfloatThe force of knockback that is applied when this projectile hits something. Remember that NPCs have resistance to knockback, while players do not. See NPC Attributes for more information.

aiPretendStyleintHow the projectile disappears in contact to tile (paricles)

activebool ???
aifloat[] ???
directionint ???
frameint ???
frameCounterint ???
identityint ???
lastPositionVector2 ???
lavaWetbool ???
localAIfloat[] ???
maxAIint ???
maxUpdatesint ???
miscTextstring ???
netSpamint ???
netUpdatebool ???
netUpdate2bool ???
numUpdatesint ???
oldPosVector2 ???
ownerint ???
playerImmuneint[] ???
positionVector2 ???
restrikeDelayint ???
rotationfloat ???
spriteDirectionint ???
velocityVector2 ???
wetbool ???
wetCountbyte ???
whoAmIint ???

Article information

Added on

Edited on

Written by

Surfpup

0 comments