tModLoader Need a little help on a basic thing

Hoswy

Official Terrarian
I'm trying to make a message popup in chat when an item is used, what did I do wrong ? (probably everything lol)


using Terraria;
using Terraria.ModLoader;
using Terraria.ID;
using Microsoft.Xna.Framework;
using System;
namespace Breach.items
{
public class ExoticReality : ModItem
{
public override void SetDefaults()
{
item.width = 17;
item.height = 17;
item.maxStack = 20;
item.value = Item.buyPrice(gold:2);
item.rare = ItemRarityID.Red;
item.consumable=true;
item.useTime = 100;
item.useStyle = ItemUseStyleID.HoldingUp;
}

public bool UseItem(Item item)
{
Main.NewText("Reality seems to fuse around you... ", 255, 240, 20, false);
return(true);
}
}
}
 
Are you getting any type of error? What happens on use? The line seems correct to me.
 
There isn't any errors and nothing happens on use, the player only plays the animation :/
I first tried it with the item spawning dust but when they didn't appear, I though of trying something else in case the Dust.NewDust was the problem
 
Last edited:
public override bool UseItem(Player player)
{
Main.NewText("Reality seems to fuse around you... ",255,255,255);
return(true);
}
Welp, I don't know why it works now, thanks anyway ! <3
probably had to put it on public override or something
 
Last edited:
Back
Top Bottom