-
Member
Wormhole plugin
Hello guys !
I'm searching if it's possible to display wormholes by a circle or something ?
I find some old threads on the forum where it says it's impossible :
dia...light=wormhole
https://www.ownedcore.com/forums/dia...light=wormhole
but, when they were written, it was also impossible to display the oculus and now we can.
So, maybe there is a solution for the wormhole?
I'm really sick of being permanently teleported just before the " big boom badaboom". (Dedicate to all Starpact Players <3)
Thanks for help !
Cheers
-
Active Member
using System.Linq;
using Turbo.Plugins.Default;
namespace Turbo.Plugins.BM
{
public class WormholePlugin : BasePlugin, IInGameWorldPainter
{
public WorldDecoratorCollection WormholeDecorator { get; set; }
public WormholePlugin()
{
Enabled = true;
}
public override void Load(IController hud)
{
base.Load(hud);
WormholeDecorator = new WorldDecoratorCollection(
new GroundShapeDecorator(hud)
{
ShapePainter = WorldStarShapePainter.NewCross(Hud),
Radius = 6f,
Brush = Hud.Render.CreateBrush(255, 0, 255, 0, 30),
}
);
}
public void PaintWorld(WorldLayer layer)
{
var wormhole = Hud.Game.Actors.Where(x => x.SnoActor.Sno == ActorSnoEnum._x1_monsteraffix_teleportmines); // 337109
foreach (var actor in wormhole)
{
WormholeDecorator.Paint(layer, actor, actor.FloorCoordinate, string.Empty);
}
}
}
}
active wormhole is marked by an X
-
Post Thanks / Like - 1 Thanks
dieudo (1 members gave Thanks to knight84 for this useful post)
-
Member
Originally Posted by
knight84
using System.Linq;
using Turbo.Plugins.Default;
namespace Turbo.Plugins.BM
{
public class WormholePlugin : BasePlugin, IInGameWorldPainter
{
public WorldDecoratorCollection WormholeDecorator { get; set; }
public WormholePlugin()
{
Enabled = true;
}
public override void Load(IController hud)
{
base.Load(hud);
WormholeDecorator = new WorldDecoratorCollection(
new GroundShapeDecorator(hud)
{
ShapePainter = WorldStarShapePainter.NewCross(Hud),
Radius = 6f,
Brush = Hud.Render.CreateBrush(255, 0, 255, 0, 30),
}
);
}
public void PaintWorld(WorldLayer layer)
{
var wormhole = Hud.Game.Actors.Where(x => x.SnoActor.Sno == ActorSnoEnum._x1_monsteraffix_teleportmines); // 337109
foreach (var actor in wormhole)
{
WormholeDecorator.Paint(layer, actor, actor.FloorCoordinate, string.Empty);
}
}
}
}
active wormhole is marked by an X
Thanks for help !
I was not excited by the big green crosses to indicate the wormhole so I opted for something more "discreet".
Wormole-plugin.jpg
But it helps me a lot
Cheers !
-
Member
Dieudo would you mind explaining how you changed the green crosses to circles?
-
Member
Originally Posted by
wigworth
Dieudo would you mind explaining how you changed the green crosses to circles?
Hi, i just replace this part :
base.Load(hud);
WormholeDecorator = new WorldDecoratorCollection(
new GroundShapeDecorator(hud)
{
ShapePainter = WorldStarShapePainter.NewCross(Hud),
Radius = 6f,
Brush = Hud.Render.CreateBrush(255, 0, 255, 0, 30),
}
);
}
by this part :
base.Load(hud);
WormholeDecorator = new WorldDecoratorCollection(
new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(255, 255, 0, 170, -2),
Radius = 5.0f,
}
);
}
Cheers
-
Post Thanks / Like - 2 Thanks
-
Member
-
Member
RNN has a good wormhole plugin if u can seach it
i really dont know how to post or add a scriipt