Exile
Exile
CC#
Created by Exile on 1/5/2024 in #help
new to c#: terraria struggles
i feel really really dumb rn
18 replies
CC#
Created by Exile on 1/5/2024 in #help
new to c#: terraria struggles
wowe
18 replies
CC#
Created by Exile on 1/5/2024 in #help
new to c#: terraria struggles
i forgot to define it in the other thing
18 replies
CC#
Created by Exile on 1/5/2024 in #help
new to c#: terraria struggles
oh
18 replies
CC#
Created by Exile on 1/5/2024 in #help
new to c#: terraria struggles
but it's right here
18 replies
CC#
Created by Exile on 1/5/2024 in #help
new to c#: terraria struggles
No description
18 replies
CC#
Created by Exile on 1/5/2024 in #help
new to c#: terraria struggles
No description
18 replies
CC#
Created by Exile on 1/5/2024 in #help
new to c#: terraria struggles
No description
18 replies
CC#
Created by Exile on 1/5/2024 in #help
new to c#: terraria struggles
using astrallogarium.Content;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;

namespace astrallogarium.Content.Items
{
public class KaiserRaiser : ModItem
{


public override void SetDefaults()
{
Item.useStyle = ItemUseStyleID.Swing;
Item.useAnimation = 10;
Item.useTime = 10;
Item.damage = 350;
Item.knockBack = 4.5f;
Item.width = 78;
Item.height = 122;
Item.scale = 1f;
Item.UseSound = SoundID.Item1;
Item.rare = ItemRarityID.Pink;
Item.value = Item.buyPrice(gold: 23);
Item.DamageType = DamageClass.Melee;
// Item.shoot = ModContent.ProjectileType<>();
Item.noMelee = true;
Item.shootsEveryUse = true;
Item.autoReuse = true;
}

public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
float adjustedItemScale = player.GetAdjustedItemScale(Item);
Projectile.NewProjectile(source, player.MountedCenter, new Vector2(player.direction, 0f), type, damage, knockback, player.whoAmI, player.direction * player.gravDir, player.itemAnimationMax, adjustedItemScale);
NetMessage.SendData(MessageID.PlayerControls, -1, -1, null, player.whoAmI);

return base.Shoot(player, source, position, velocity, type, damage, knockback);

}

public override void AddRecipes()
{
Recipe recipe = CreateRecipe();
recipe.AddIngredient(ItemID.FragmentSolar, 50);
recipe.AddIngredient(ItemID.Katana, 1);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.Register();
}
}
}
using astrallogarium.Content;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;

namespace astrallogarium.Content.Items
{
public class KaiserRaiser : ModItem
{


public override void SetDefaults()
{
Item.useStyle = ItemUseStyleID.Swing;
Item.useAnimation = 10;
Item.useTime = 10;
Item.damage = 350;
Item.knockBack = 4.5f;
Item.width = 78;
Item.height = 122;
Item.scale = 1f;
Item.UseSound = SoundID.Item1;
Item.rare = ItemRarityID.Pink;
Item.value = Item.buyPrice(gold: 23);
Item.DamageType = DamageClass.Melee;
// Item.shoot = ModContent.ProjectileType<>();
Item.noMelee = true;
Item.shootsEveryUse = true;
Item.autoReuse = true;
}

public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
{
float adjustedItemScale = player.GetAdjustedItemScale(Item);
Projectile.NewProjectile(source, player.MountedCenter, new Vector2(player.direction, 0f), type, damage, knockback, player.whoAmI, player.direction * player.gravDir, player.itemAnimationMax, adjustedItemScale);
NetMessage.SendData(MessageID.PlayerControls, -1, -1, null, player.whoAmI);

return base.Shoot(player, source, position, velocity, type, damage, knockback);

}

public override void AddRecipes()
{
Recipe recipe = CreateRecipe();
recipe.AddIngredient(ItemID.FragmentSolar, 50);
recipe.AddIngredient(ItemID.Katana, 1);
recipe.AddTile(TileID.LunarCraftingStation);
recipe.Register();
}
}
}
18 replies