❓ Making a new item
Hi! Since Terraria code is too annoying, I just CAN'T figure out how to properly create a new item.
Inspired by MrBlueSL, I want to make a item that switch between day and night.
What I have right now:
Item.cs
Player.cs
aaand I put it to sell at the merchant.
What I have to do now? I am doing right until here?
Thanks!
Inspired by MrBlueSL, I want to make a item that switch between day and night.
What I have right now:
Item.cs
Code:
else if (this.type == 1966)
{
this.channel = true;
this.damage = 0;
this.useStyle = 4;
this.name = "Day Orb";
this.shoot = 18;
this.width = 24;
this.height = 24;
this.useSound = 8;
this.useAnimation = 20;
this.useTime = 20;
this.rare = 1;
this.noMelee = true;
this.toolTip = "Summons the day";
this.value = Item.sellPrice(1, 0, 0, 0);
this.color = new Color(189, 173, 23, 200);
}
Code:
if (this.whoAmi == Main.myPlayer && this.inventory[this.selectedItem].type == 1966)
{
Main.dayTime = true;
Main.time = 0.0;
}
What I have to do now? I am doing right until here?
Thanks!
