WVN on PS3
Terrarian
C#:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace DodgeMod.Items.Weapons
{
public class ChewToy : ModItem
{
public override void SetDefaults()
{
item.name = "Chew Toy";
item.damage = 9750;
item.melee = true;
item.width = 49;
item.height = 50;
item.toolTip = "Woof";
item.useTime = 8;
item.useAnimation = 8;
item.useStyle = 1;
item.knockBack = 17.5;
item.value = item.buyPrice(50, 0, 0, 0);
item.rare = 13;
item.useSound = 1;
item.autoReuse = true;
item.useTurn = true;
item.shoot = mod.ProjectileType("Doge");
item.shootSpeed = 8f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.TerraBlade, 1);
recipe.AddIngredient(ItemID.DirtBlock, 10);
recipe.AddTile(TileID.Workbenches);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Here is my projectile code:
C#:
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace DodgeMod.Items.Projectiles
{
public class PixelatedDoge : ModProjectile
{
public override void SetDefaults()
{
projectile.name = "Pixelated Doge";
projectile.width = 49;
projectile.height = 50;
projectile.friendly = true;
projectile.melee = true;
projectile.tileCollide = false;
projectile.penetrate = 30;
projectile.timeLeft = 500;
projectile.light = 2.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;
}
}
}