Lukas04
Official Terrarian
Im Dont Know that Self C: sryOk so if i wanted to make a Projectile shoot a stream how would i go along setting that up?
Im Dont Know that Self C: sryOk so if i wanted to make a Projectile shoot a stream how would i go along setting that up?
I think he Means like the Golden ShowerWhate exactly do you mean by 'stream'?
That's actually fairly simple, let me get something setup.It's ok maybe Eldrazi can help
[doublepost=1461769073,1461768989][/doublepost]Oh like the Aqua Scepter!!!
Better Than Mine C:Thank you so much and do you like my new profile image?
Better Than Mine C:
I've always likes Emrakul.It's a joke to Eldrazi bekus there "Eldrazi's"
I was hoping he would like it!!
Your looks good to me
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace MyMod.Items
{
public class MyItem : ModItem
{
public override void SetDefaults()
{
this.name = "MyItem";
this.width = 16;
this.height = 16;
this.value = 50;
this.rare = 4;
this.damage = 20;
this.knockBack = 2f;
this.useStyle = 5;
this.useTime = 6;
this.useAnimation = 18;
// Since useAnimation is set to 18 and useTime is set to 6, this item will be fired 3 times everytime it's used (since 18 / 6 = 3).
this.magic = true;
this.noMelee = true
this.autoReuse = true;
this.shoot = mod.ProjectileType("MyProjectile");
this.shootSpeed = 10f;
this.useSound = 13;
}
}
}
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace MyMod.Projectiles
{
public class MyProjectile : ModProjectile
{
public override void SetDefaults()
{
projectile.name = "My Projectile";
projectile.width = 32;
projectile.height = 32;
projectile.friendly = true;
projectile.alpha = 255;
projectile.penetrate = 5;
projectile.extraUpdates = 2;
projectile.ignoreWater = true;
projectile.magic = true;
}
public override bool PreAI()
{
projectile.scale -= 0.002f;
if (projectile.scale <= 0f)
{
projectile.Kill();
}
if (projectile.ai[0] <= 3f)
{
projectile.ai[0] += 1f;
return false;
}
projectile.velocity.Y = projectile.velocity.Y + 0.075f;
for (int i = 0; i < 3; i++)
{
float x = projectile.velocity.X / 3f * i;
float y = projectile.velocity.Y / 3f * i;
int num154 = 14;
int newDust = Dust.NewDust(new Vector2(projectile.position.X + 14, this.position.Y + 14), projectile.width - 14 * 2, projectile.height - 14 * 2, 170, 0f, 0f, 100, default(Color), 1f);
Main.dust[newDust].noGravity = true;
Main.dust[newDust].velocity *= 0.1f;
Main.dust[newDust].velocity += projectile.velocity * 0.5f;
Dust dust = Main.dust[newDust];
dust.position.X = dust.position.X - x;
dust.position.Y = dust.position.Y - y;
}
if (Main.rand.Next(8) == 0)
{
int newDust = Dust.NewDust(new Vector2(projectile.position.X + 16, projectile.position.Y + 16), projectile.width - 16 * 2, projectile.height - 16 * 2, 170, 0f, 0f, 100, default(Color), 0.5f);
Main.dust[newDust].velocity *= 0.25f;
Main.dust[newDust].velocity += projectile.velocity * 0.5f;
return;
}
return false;
}
}
}
ItemID.Something is for vanilla items. mod.ItemType("Something") is for mod items.I need help i keep getting this and i did from what it seems every thing right..
c:\Users\Brown\Documents\My Games\Terraria\ModLoader\Mod Sources\CursesOfInnocence\Items\CursesOfInnocence.cs(38,32) : error CS0117: 'Terraria.ID.ItemID' does not contain a definition for 'LamentOfInnocence'
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace LamentOfInnocence.Items
{
public class LamentOfInnocence : ModItem
{
public override void SetDefaults()
{
item.name = "Lament Of Innocence";
item.damage = 80;
item.melee = true;
item.width = 60;
item.height = 60;
item.toolTip = "Ice and water fills the lungs of are foes.";
item.useTime = 22;
item.useAnimation = 22;
item.useStyle = 1;
item.knockBack = 8;
item.value = 10000;
item.rare = 5;
item.useSound = 1;
item.autoReuse = true;
item.useTurn = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.WarriorEmblem, 1);
recipe.AddIngredient(ItemID.IceBlade, 1);
recipe.AddIngredient(ItemID.BreakerBlade, 1);
recipe.AddIngredient(ItemID.Frostbrand, 1);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
if(Main.rand.Next(0, 4) == 0)
{
target.AddBuff(BuffID.Frostburn, 900);
}
{
player.AddBuff(BuffID.IceBarrier, 900);
}
}
}
}
and i'm trying to use it as a recipe with this.
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace CursesOfInnocence.Items
{
public class CursesOfInnocence : ModItem
{
public override void SetDefaults()
{
item.name = "Curses Of Innocence";
item.damage = 110;
item.melee = true;
item.width = 65;
item.height = 65;
item.toolTip = ".";
item.useTime = 23;
item.useAnimation = 23;
item.useStyle = 1;
item.knockBack = 8;
item.value = 10000;
item.rare = 6;
item.useSound = 1;
item.autoReuse = true;
item.useTurn = true;
item.shoot = mod.ProjectileType("ChaosFire");
item.shootSpeed = 6f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.WarriorEmblem, 1);
recipe.AddIngredient(ItemID.LamentOfInnocence, 1);
recipe.AddIngredient(ItemID.CurseOfDarkness, 1);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
if(Main.rand.Next(0, 4) == 0)
{
target.AddBuff(BuffID.Chilled, 500);
}
{
target.AddBuff(BuffID.OnFire, 500);
}
{
target.AddBuff(BuffID.Shadowflame, 150);
}
{
target.AddBuff(BuffID.Ichor, 100);
}
}
}
}
Looking through the documentation or even just through the recipes in ExampleMod would have told you that.How would i put that or were i'm still learning and never have add items that are mods into a recipe?
How would i put that or were i'm still learning and never have add items that are mods into a recipe?
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace PreHardmodeWings.Items
{
public class TreeFoliageWings : ModItem
{
public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
{
equips.Add(EquipType.Wings);
return true;
}
public override void SetDefaults()
{
item.name = "Tree leaves Wings";
item.width = 32;
item.height = 32;
item.toolTip = "Made of the Foliage of Trees!.";
item.value = 10;
item.rare = 2;
item.accessory = true;
}
public override void UpdateAccessory(Player player, bool hideVisual)
{
player.wingTimeMax = 10;
}
public override void VerticalWingSpeeds(ref float ascentWhenFalling, ref float ascentWhenRising,
ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
{
ascentWhenFalling = 0.85f;
ascentWhenRising = 0.15f;
maxCanAscendMultiplier = 1f;
maxAscentMultiplier = 3f;
constantAscend = 0.135f;
}
public override void HorizontalWingSpeeds(ref float speed, ref float acceleration)
{
speed = 1.1f;
acceleration *= 2.5f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(null,"WingSkelett", 1);
recipe.AddIngredient(ItemID.Wood, 50);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Can you send the Code?I did that but it's telling me Lament Of Innocence has no ID?
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace LamentOfInnocence.Items
{
public class LamentOfInnocence : ModItem
{
public override void SetDefaults()
{
item.name = "Lament Of Innocence";
item.damage = 80;
item.melee = true;
item.width = 60;
item.height = 60;
item.toolTip = "Ice and water fills the lungs of are foes.";
item.useTime = 22;
item.useAnimation = 22;
item.useStyle = 1;
item.knockBack = 8;
item.value = 10000;
item.rare = 5;
item.useSound = 1;
item.autoReuse = true;
item.useTurn = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.WarriorEmblem, 1);
recipe.AddIngredient(ItemID.IceBlade, 1);
recipe.AddIngredient(ItemID.BreakerBlade, 1);
recipe.AddIngredient(ItemID.Frostbrand, 1);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
if(Main.rand.Next(0, 4) == 0)
{
target.AddBuff(BuffID.Frostburn, 900);
}
{
player.AddBuff(BuffID.IceBarrier, 900);
}
}
}
}
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Graphics.Effects;
using Terraria.Graphics.Shaders;
using Terraria.ID;
using Terraria.ModLoader;
namespace CursesOfInnocence.Items
{
public class CursesOfInnocence : ModItem
{
public override void SetDefaults()
{
item.name = "Curses Of Innocence";
item.damage = 110;
item.melee = true;
item.width = 65;
item.height = 65;
item.toolTip = "All will be lost in the darkset of flames and cold ice.";
item.useTime = 23;
item.useAnimation = 23;
item.useStyle = 1;
item.knockBack = 8;
item.value = 10000;
item.rare = 6;
item.useSound = 1;
item.autoReuse = true;
item.useTurn = true;
item.shoot = mod.ProjectileType("ChaosFire");
item.shootSpeed = 6f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.WarriorEmblem, 1);
recipe.AddIngredient(ItemID.LamentOfInnocence, 1);
recipe.AddIngredient(ItemID.CurseOfDarkness, 1);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
if(Main.rand.Next(0, 4) == 0)
{
target.AddBuff(BuffID.Chilled, 500);
}
{
target.AddBuff(BuffID.OnFire, 500);
}
{
target.AddBuff(BuffID.Shadowflame, 150);
}
{
target.AddBuff(BuffID.Ichor, 100);
}
}
}
}
Can you give the FUll Error?I did that but it's telling me Lament Of Innocence has no ID?