It works, but I feel like there has to be a better way to do it.
Currently it replaces the Plasma Balls for the Plasma Gun.
The code is below or here:
https://gitlab.com/metalx1000/Doom-Zscr ... type=heads
Code: Select all
// replaces PlasmaBall with shrink ray ball
// each hit will shrink monster by .01 until they are at have size
class ShrinkBall : PlasmaBall Replaces PlasmaBall
{
Default
{
Translation "192:207=16:31"; //make the ball red
Damage 0;
}
override void Tick()
{
super.Tick();
double dist = 0;
let bti = BlockThingsIterator.Create(self, dist);
while (bti.Next())
{
let act = bti.thing;
if(bti.thing.bIsMonster){
if (self && Distance3D(bti.thing) < 64)
{
if(bti.thing.scale.y > .5){
//Console.Printf(TEXTCOLOR_GREEN .. "%f", bti.thing.scale.y);
bti.thing.Scale = (bti.thing.Scale.x*.99,bti.thing.Scale.x*.99);
//bti.thing.Scale.x-=.01;
//bti.thing.Scale.y-=.01;
}
}
}
}
}
}