-
Legendary
I don't quite understand what you want to do.
Code:
HitBoxDecorator = new WorldDecoratorCollection(
new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(50, 200, 200, 200, 0),
Radius = -1
},
new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(150, 200, 200, 200, 1),
Radius = -1
}
);
0 indicates that the entire circle should be filled, this is to show the monster's hitbox.
A non-zero number draws an outer line of the indicated thickness, in this case 1. You can change it to 2 or 3.
If you don't want the hitbox to be displayed, remove the corresponding code, it would look like this
Code:
HitBoxDecorator = new WorldDecoratorCollection(
new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(150, 200, 200, 200, 1),
Radius = -1
}
);
-
Member
227.jpg
1 BKCursorOnMonster (HitBoxDecorator)
Order = 30004;
MonsterCirclePlugin_Mod
Order = 30003;
2 BKCursorOnMonster (No HitBoxDecorator)
Order = 30004;
MonsterCirclePlugin_Mod
Order = 30003;
HitBox
Order = 30002;
-
Member
000125.png
HitBox trash
Thank you RNN
using System.Linq;
using Turbo.Plugins.Default;
namespace Turbo.Plugins.RNN
{
public class HitBox : BasePlugin, IInGameWorldPainter
{
public WorldDecoratorCollection Mira { get; set; }
public bool OnlyGR { get; set; }
public HitBox()
{
Enabled = true;
}
public override void Load(IController hud)
{
base.Load(hud);
Order = 30002;
OnlyGR = false;
Mira = new WorldDecoratorCollection(
new GroundShapeDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(180, 204, 204, 204, 2),
ShadowBrush = Hud.Render.CreateBrush(96, 0, 0, 0, 1),
ShapePainter = WorldStarShapePainter.NewCross(Hud),
Radius = 4
},
new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(180, 204, 204, 204, -2),
Radius = -1
}
);
}
public void PaintWorld(WorldLayer layer)
{
if (Hud.Game.MapMode == MapMode.Map) return;
if ( OnlyGR && (Hud.Game.SpecialArea != SpecialArea.GreaterRift) ) return;
var monster = Hud.Game.SelectedMonster2 ?? Hud.Game.SelectedMonster1;
if (monster == null) return;
if (monster.IsSelected)
{
foreach (var deco in Mira.GetDecorators<GroundShapeDecorator>())
deco.Radius = monster.RadiusBottom * 1.1f;
Mira.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
}
}
}
}
Last edited by RawHulk2; 3 Days Ago at 03:26 AM.
-
Legendary
The problem is that the hitbox is filled in two plugins: BKCursorOnMonster and MonsterCirclePlugin_Mod, so I removed it from the former. I also tweaked some details, such as adjusting the crosshair to fit the monster's hitbox (it sticks out a bit on purpose, line 172: "deco.Radius = monster.RadiusBottom * 1.1f;" , delete the green text if you don't want this). It can be downloaded from the original post.
https://www.ownedcore.com/forums/dia...ml#post4055768 (Request plugin to show distance at cursor)
Last edited by RNN; 1 Week Ago at 05:22 AM.
-
Post Thanks / Like - 1 Thanks
RawHulk2 (1 members gave Thanks to RNN for this useful post)