Standalone [1.3] tModLoader - A Modding API

c:\Users\Devin\Documents\My Games\Terraria\ModLoader\Mod Sources\Enderuim\Tiles\ExampleBlockGen.cs(17,48) : error CS0246: The type or namespace name 'PassLegacy' could not be found (are you missing a using directive or an assembly reference?)
using Terraria.GameContent.Generation;
 
How the hell do I know if my ore generated or not?
 
how is animation done
 
When I use 'if (item.type == ItemID.an item)' it gives me an error message when I try to compile it saying that:
The name 'item' does not exist in the current context. Why?
 
When I use 'if (item.type == ItemID.an item)' it gives me an error message when I try to compile it saying that:
The name 'item' does not exist in the current context. Why?
use the # ids
 
When I use 'if (item.type == ItemID.an item)' it gives me an error message when I try to compile it saying that:
The name 'item' does not exist in the current context. Why?

Like it says, there is no variable named item in your class or method. Either you forgot to declare it or it's not in the same scope as your method.
 
Depends on what kind of animation we're talking about...?
like 3 and 4 frame constant animation that is played when the projectile or entity is alive
 
Like it says, there is no variable named item in your class or method. Either you forgot to declare it or it's not in the same scope as your method.
How'd I deal with this then?
 
public override void Load()
{
if ((item.type == 3335 ) && player.extraAccessory)
{
flag2 = true;
}
}
 
public override void Load()
{
if ((item.type == 3335 ) && player.extraAccessory)
{
flag2 = true;
}
}

Can you post the entire code in a code block?
 
Can you post the entire code in a code block?
Code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using imkSushisModDropsAddon.NPCs;

namespace imkSushisModDropsAddon {
public class imkSushisModDropsAddon : Mod
{
       public override void SetModInfo(out string name, ref ModProperties properties)
    {
        name = "imkSushisModDropsAddon";
        properties.Autoload = true;
    }
    public override void Load()
    {
    if ((item.type == 3335 ) && player.extraAccessory)
        {
            flag2 = true;
        }
    }
}}
 
Code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using imkSushisModDropsAddon.NPCs;

namespace imkSushisModDropsAddon {
public class imkSushisModDropsAddon : Mod
{
       public override void SetModInfo(out string name, ref ModProperties properties)
    {
        name = "imkSushisModDropsAddon";
        properties.Autoload = true;
    }
    public override void Load()
    {
    if ((item.type == 3335 ) && player.extraAccessory)
        {
            flag2 = true;
        }
    }
}}

What exactly are you trying to do? It looks like you're trying to do something with the Demon Heart, but at any rate you shouldn't be doing that in the Load method of your Mod override.
 
What exactly are you trying to do? It looks like you're trying to do something with the Demon Heart, but at any rate you shouldn't be doing that in the Load method of your Mod override.
What method should I be trying to use?
I am making the Demon Heart work in Normal Mode, and I need the ability to use it first.
 
What method should I be trying to use?
I am making the Demon Heart work in Normal Mode, and I need the ability to use it first.
Since there hasn't been an answer yet, allow me:
First you'll want to make a class that derives from GlobalItem. In there, you'll basically want to put in the Demon Heart functionality, taking away the expert mode check:
Code:
public class MyGlobalItem : GlobalItem
{
    public override bool CanUseItem(Item item, Player player)
    {
        if (item.type == 3335 && player.itemAnimation > 0 && !player.extraAccessory && player.itemTime == 0)
        {
            player.itemTime = item.useTime;
            player.extraAccessory = true;
            NetMessage.SendData(4, -1, -1, Main.player[player.whoAmI].name, player.whoAmI, 0f, 0f, 0f, 0, 0, 0);
        }
        return true;
    }
}
Now I'm not sure if this will also play the use animation.. (untested).
 
can you help with the animation please?
[DOUBLEPOST=1457393388,1457393269][/DOUBLEPOST]and after animation, how do you make a mob randomly teleport?
 
Back
Top Bottom