hey Pacer, I'm trying to make my modded ONS2 Bio grenade launcher and I'm wondering how to get rid of the globlings, I just want a single explosion. I see the code for it in ONS2Proj_Grenade:
simulated function Explode(vector HitLocation, vector HitNormal)
{
SplashGloblings();
super.Explode(HitLocation, HitNormal);
}
and
simulated function Explode(vector HitLocation, vector HitNormal)
{
SplashGloblings();
if (!WorldInfo.GRI.OnSameTeam(Owner, Instigator))
{
ImpactedActor = Owner;
super.Explode(HitLocation, HitNormal);
ImpactedActor = None;
}
else
{
super.Explode(HitLocation, HitNormal);
}
}
}
simulated function SplashGloblings()
{
local int g;
local UTProj_BioShot NewGlob;
local Vector VNorm;
if (Role == ROLE_Authority)
{
for (g=0; g < 4; g++)
{
NewGlob = Spawn(class'UTProj_BioGlobling', self,, Location+50*SurfaceNormal);
if (NewGlob != None)
{
NewGlob.Velocity = (250 + FRand()*150.0) * (SurfaceNormal + VRand()*0.8);
if (Physics == PHYS_Falling)
{
VNorm = (Velocity dot SurfaceNormal) * SurfaceNormal;
NewGlob.Velocity += (-VNorm + (Velocity - VNorm)) * 0.1;
}
NewGlob.InstigatorController = InstigatorController;
}


Recent comments
12 hours 11 min ago
19 hours 7 min ago
19 hours 22 min ago
23 hours 38 min ago
1 day 14 hours ago
1 day 16 hours ago
4 days 21 hours ago
1 week 20 hours ago
1 week 21 hours ago
1 week 2 days ago