Fizzard007
Golem
do you know how to fix this error?DAAAANG! That's way cool!!
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;
}
}
}