jamiesmith9255
Steampunker
I been trying to do it my self but seem to be stuck if some one could post a sample for me or give me a few projectile scripts that would be cool?!
item.shoot = mod.ProjectileType("ProjektileName");
item.shootSpeed = SpeedOfProjektilef;
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace SwordOfCthulhu.Items.Weapons
{
public class SwordOfCthulhu : ModItem
{
public override void SetDefaults()
{
item.name = "Sword Of Cthulhu";
item.damage = 500;
item.melee = true;
item.width = 58;
item.height = 66;
item.toolTip = "You feel celestial Power! ";
item.useTime = 8;
item.useAnimation = 8;
item.useStyle = 1;
item.knockBack = 6;
item.value = 100;
item.rare = 10;
item.useSound = 1;
item.autoReuse = true;
item.useTurn = true;
item.shoot = mod.ProjectileType("SwordOfCthulhuBeam");
item.shootSpeed = 12f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.TerraBlade, 1);
recipe.AddIngredient(ItemID.Meowmere, 1);
recipe.AddIngredient(ItemID.StarWrath, 1);
recipe.AddIngredient(ItemID.LunarBar, 25);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace SwordOfCthulhu.Projectiles
{
public class SwordOfCthulhuBeam : ModProjectile
{
public override void SetDefaults()
{
projectile.name = "Sword Of Cthulhu Beam";
projectile.width = 30;
projectile.height = 58;
projectile.friendly = true;
projectile.melee = true;
projectile.tileCollide = true;
projectile.penetrate = 30;
projectile.timeLeft = 200;
projectile.light = 0.75f;
projectile.extraUpdates = 1;
projectile.ignoreWater = true;
}
public override void AI()
{
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
}
}
}
Thank you so much i'v been trying to get it right for like 2 days and now i hope this works
Do i put it in the Mod Sources folder it just seems to be reading my
Projectiles folder as a mod
Can you send a Screenshot and the Code?It's telling me this... c:\Users\Brown\Documents\My Games\Terraria\ModLoader\Mod Sources\TestBlade\Projectiles\GreatFire.cs(25,42) : error CS0103: The name 'Math' does not exist in the current context
Can you send a Screenshot and the Code?
evvt i only Reply in 12 Hour again Because i go Sleep in 5 min C:
You'll need to include the correct namespace to be able to use the Math class and functions. Add the following line to the rest of your using statements:It's telling me this... c:\Users\Brown\Documents\My Games\Terraria\ModLoader\Mod Sources\TestBlade\Projectiles\GreatFire.cs(25,42) : error CS0103: The name 'Math' does not exist in the current context
using System;
Well, where do you see similar code? Especially notice the Add the following line to the rest of your using statements part.What line would i put it in? If you don't mind showing me.
using Terraria.ID;
using Terraria.ModLoader;
namespace TestBlade.Projectiles
{
public class GreatFire : ModProjectile
{
public override void SetDefaults()
{
projectile.name = "Great Fire";
projectile.width = 64;
projectile.height = 64;
projectile.friendly = true;
projectile.melee = true;
projectile.tileCollide = true;
projectile.penetrate = 30;
projectile.timeLeft = 200;
projectile.light = 0.75f;
projectile.extraUpdates = 1;
projectile.ignoreWater = true;
}
public override void AI()
{
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
}
}
Well, where do you see similar code? Especially notice the Add the following line to the rest of your using statements part.
Aaaaall the way at the top, with the rest of the using statements.I could not get it right i'm not that great when it comes to using Cs it would be nice of you just to show me were it goes so when i do this again i don't make the same mistake over and over again. I have been trying tho.
?? Xcuse me?OOOOOOOOooohhhhhhhh I feel so dumb but it's so funny when you pointed it out as i was looking a the bottom rather then the top
[doublepost=1461757909,1461757384][/doublepost]Hmmm it seem to fire more when i jump and less when i'm on the ground.
I got The it to that Projektiles dont Spawn near GroundIt's funny to see as if i walk the light will show as if it was shot but if i jump the
Projectile comes out It's how do you say out of this world
item.tileCollide = True;
item.tileCollide = false;
Currently no C:So that's why still i like the idea it's just i could not find out how to fix it if i wanted it to do it when i did not jump!
Thank you vary much but i must ask since you maybe able to help. As a side note do you know how to add debuffs on weapons?