No I mean the code from the PetCall.cs file.here
The problem is a custom workbench tile, so if you want to use a custom workbench then change the name of WBName to the workbench name, if you don't want it crafted at a workbench then remove that line, or if you want to use regular workbenches, then add the line TileID.WorkBenches in place of 'null, "WBNAME"using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace YourModName.Items
{
public class PetCall : ModItem
{
public override void SetDefaults()
{
item.CloneDefaults(ItemID.ZephyrFish);
item.name = "Cool Pet";
item.toolTip = "Summons a Cool Pet to follow you";
item.shoot = mod.ProjectileType("PetName");
item.buffType = mod.BuffType("PetBuff");
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock, 1);
recipe.AddTile(null, "WBName");
recipe.SetResult(this);
recipe.AddRecipe();
}
public override void UseStyle(Player player)
{
if (player.whoAmI == Main.myPlayer && player.itemTime == 0)
{
player.AddBuff(item.buffType, 3600, true);
}
}
}
}
Glad it workedYEEES, thanks it worked
Hi, i have a doubt, i want to make a mount of the creature of the file, i wanted to know where i can find the codes i need for the .cs files
Yeah, but it doesnt work, it gives error, also i need it to be land creature, not flying one. Also i need to know if need to cut sprites of the image or not.Hi, i have a doubt, i want to make a mount of the creature of the file, i wanted to know where i can find the codes i need for the .cs files
This looks like somehow you have an incomplete install. Are you sure you have tmodloaderserver.exe in the steam folder?I have a problem... I have tmodloader, but when I try to do modded multiplayer it gives me this error:
7/8/2011 8:30:43 PM
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at Terraria.Main.DrawMenu()
at Terraria.Main.Draw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.DrawFrame()
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Terraria.Program.Main(String[] args)
same thing happened to a friend... me an him have a intel i3 core! is this a bug?
I tried to do it without mods and it worked fine
but when I try multiplayer with mods it crashes and the error above appears on screen
Aaron
i did the cs files of the mount i said earlyer, when i build + reload this error apparears:This looks like somehow you have an incomplete install. Are you sure you have tmodloaderserver.exe in the steam folder?
Can I look at your code for the MountItem.cs file?i did the cs files of the mount i said earlyer, when i build + reload this error apparears:
c:\Users\hp\Documents\My Games\Terraria\ModLoader\Mod Sources\YourModName\Items\MountItem.cs(18,18) : error CS1061: 'Terraria.Item' doesnt contain any definition of 'useSound' or found any metod of extension 'useSound' that accepts a first argument of type 'Terraria.Item' (is a directive missing from an assembly reference?)
Basically something is wrong in the whole line. Try UseSound or SoundID.Item1i did the cs files of the mount i said earlyer, when i build + reload this error apparears:
c:\Users\hp\Documents\My Games\Terraria\ModLoader\Mod Sources\YourModName\Items\MountItem.cs(18,18) : error CS1061: 'Terraria.Item' doesnt contain any definition of 'useSound' or found any metod of extension 'useSound' that accepts a first argument of type 'Terraria.Item' (is a directive missing from an assembly reference?)
im going to try, sorry, i dont know anything about doing npc spawn naturallyBasically something is wrong in the whole line. Try UseSound or SoundID.Item1
Ps can I really please get help on how to make a worm enemy naturally spawn?
do you mean do this? :Change 79 to SoundID.Item78
Yeah, but 79 is what i meant not 78do you mean do this? :
item.useSound = SoundID.Item78;
keeps saying the same error, the error aparears in Spanish, because i am spanish, maybe i have to put it in the languague?Yeah, but 79 is what i meant not 78