tAPI Wepon Mod!

Is it Awesome?

  • yes

  • it could be improved

  • no (if so please say why so i could try to improve)

  • Could be imrpoved

  • no (please say why)

  • trolls will be ignored


Results are only viewable after voting.
DAAAANG! That's way cool!!
nfqrg4.png
do you know how to fix this error?
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Terraria.Main.PlaySound(System.Int32 type, System.Int32 x = -1, System.Int32 y = -1, System.Int32 Style = 1)
at Terraria.NPC.StrikeNPC(System.Int32 Damage, System.Single knockBack, System.Int32 hitDirection, System.Boolean crit = False, System.Boolean noEffect = False, System.Single critMult = 2)
at Terraria.NPC.UpdateNPC(System.Int32 i)
at Terraria.Main.UpdateReal(Microsoft.Xna.Framework.GameTime gameTime)

heres my code

Code:
{
    "displayName": "Corrupt Beast",
    "size": [76,76],
    "value": [0,4,60,4],
    "npcSlots": 8,
    "aiStyle": 3,
    "animationType": 3,
    "lifeMax": 700,
    "damage": 20,
    "defense": 3,
    "frameCount": 4,
    "soundHit": 15,
    "soundKilled": 6,
    "knockbackResist": 0.5,

    "drops":
    [
        {
            "item": "WM:kSlimeSword",
            "chance": 0.70,
            "stack": 1
        },
        {
           "item": "Vile Powder",
           "chance": 0.10,
           "stack": 4    
        },
        {
           "item": "Rotten Chunk",
           "chance": 0.10,
           "stack": 2
        },
        {
           "item": "Demonite Ore",
           "chance": 0.10,
           "stack": 38
        },
        {
           "item": "Shadow Scale",
           "chance": 0.10,
           "stack": 38
        }
    ]
}

and heres my cs

Code:
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework.Graphics;

using TAPI;
using Terraria;

namespace WM.NPCs
{
     public class Corruption_beast_Sheet : ModNPC
     {
          public override bool CanSpawn( int x, int y, int type, Player spawnedOn)
          {
               if (y <= Main.worldSurface &&
((!Main.dayTime && !spawnedOn.zoneEvil && Main.rand.Next(3) == 0)))
               {
                    return false;
               }
          return false;
          }
     }
}
 
Try This,

Code:
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework.Graphics;

using TAPI;
using Terraria;

namespace WM.NPCs
{
     public class Corruption_beast_Sheet : ModNPC
     {
          public override bool CanSpawn( int x, int y, int type, Player spawnedOn)
          {
               if (y <= Main.worldSurface && !Main.dayTime && !spawnedOn.zoneEvil && Main.rand.Next(3) == 0) return true;
                    return false;
          }
     }
}
nfqrg4.png
 
Last edited:
Try This,

Code:
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework.Graphics;

using TAPI;
using Terraria;

namespace WM.NPCs
{
     public class Corruption_beast_Sheet : ModNPC
     {
          public override bool CanSpawn( int x, int y, int type, Player spawnedOn)
          {
               if (y <= Main.worldSurface && !Main.dayTime && !spawnedOn.zoneEvil && Main.rand.Next(3) == 0) return true;
                    return false;
          }
     }
}
nfqrg4.png
I Fixed it already. my sound id was invalid
 
These Sprites Doh.... I dont like mods unless they have decent sprites... Im not a good spriter my self though
 
Last edited:
These Sprites Doh.... I dont like mods unless they have decent sprites... Im not a good spriter my self though
well i started this mod for fun so...
[DOUBLEPOST=1428302366][/DOUBLEPOST]NOOOO NOOO NOOO. MY WEPON FILE GOT CORRUPTED I HAD NO BACKUP
 
Back
Top Bottom