4/26/2023 0 Comments How to put tmodloader on terrariaThis file is stored in the folder \Mod Sources\(mod name, folder can't have spaces)\Projectiles.Ĭollision.HitTiles(projectile.position, projectile.velocity, projectile.width, projectile.height) Namespace Mod.Projectiles //where it's stored. We can fix that by adding the following code: This is because AI does not do this the hook Kill does this. However, you may notice that when it hits a tile, it simply despawns with no noise or particle effects. }So now we have a projectile that, when spawned, moves straight forward until it hits something or has been active for 600 frames. Terraria runs at 60FPS, so it lasts 10 seconds.ĪiType = ProjectileID.Bullet //This clones the exact AI of the vanilla projectile Bullet. Projectile.timeLeft = 600 //lasts for 600 frames/ticks. Projectile.ranged = true //ranged projectile Projectile.aiStyle = 0 //projectile moves in a straight line Projectile.height = 20 //sprite is 20 pixels tall Projectile.width = 2 //sprite is 2 pixels wide Public class Bullet : ModProjectile //the class of the projectile This file is stored in the folder \Mod Sources\(mod name, folder can't have spaces)\Projectiles. ![]() ![]() Namespace Mod.Projectiles //where it's stored, replace Mod with the name of your mod. Using System //what sources the code uses, these sources allow for calling of terraria functions, existing system functions and microsoft vector functions (probably more)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |