I'll post my (very scuffed) code that does this once I'm on my laptop.i just got into tmodloader programming and im trying to find out how to drop projectiles out of the sky like star fury , star wrath etc can anyone help me with the code?
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
float PosX = Main.MouseWorld.X; //Makes the projectile always spawn above the cursor
float PosY = player.position.Y - 600f; //makes the projectile spawn in the sky so it can shoot down
Projectile.NewProjectile(source, PosX, PosY, 0f, 1f, type, damage, knockback, player.whoAmI);
return false;
}
getting the error at "EntitySource_ItemUse_WithAmmo"Seems right to me
Oh, right. Just add this with the other using statements.its
getting the error at "EntitySource_ItemUse_WithAmmo"
alright ill try that, thanks againOh, right. Just add this with the other using statements.
using Terraria.DataStructures;
down to 3 errors , im wasting ur time rn but now error about "Vector2" namespace could not be found , are u missing a assembly referenceOh, right. Just add this with the other using statements.
using Terraria.DataStructures;
using Microsoft.Xna.Framework;down to 3 errors , im wasting ur time rn but now error about "Vector2" namespace could not be found , are u missing a assembly reference
I have a lot of free time, don't worry about itand again sorry for wasting ur time
last thing , its saying that "Item.shoot" does not exist in the namespace , it did work beforeusing Microsoft.Xna.Framework;
I have a lot of free time, don't worry about it
Odd... I haven't run into that error before, sadly, so I can't really help with thatlast thing , its saying that "Item.shoot" does not exist in the namespace , it did work before
found it out , i have to use the id of the projectiles now not the name.Odd... I haven't run into that error before, sadly, so I can't really help with that
small minor error with the code. it spawns and then instantly dissapears and doesnt fly down...Odd... I haven't run into that error before, sadly, so I can't really help with that