I need some help, do people get credit for scores using the clster in base legions?
My fuction below returns no score..
My fuction below returns no score..
Code:
function StarburstClusterBomb::onExplode(%this, %obj, %position, %fade)
{
if (!%obj.triggered)
return;
// create the cluster bombs
%objVelocity = %obj.getVelocity();
for (%i = 0; %i < %this.clusterRingCount; %i++)
{
%angle = 0;
%angleOffset = 6.28 / %this.clusterCount[%i]; // 6.28
for (%j = 0; %j < %this.clusterCount[%i]; %j++)
{
%x = mSin(%angle);
%y = mCos(%angle);
%z = %this.clusterZVelocityRatio[%i];
%velocity = VectorNormalize(%x SPC %y SPC %z); //0.5 //0.5 //0.5
//%randomVariance = VectorScale((getRandom() - 0.9) SPC (getRandom() - 0.9) SPC (getRandom() - 0.9), %this.clusterVelocityVariance[%i] * 2);
%vec = "0 0 -1";
%vector = "0 0 -1";
%x = (getRandom() - 0.5) * 2 * 3.1415926 * 3.1415926;
%y = (getRandom() - 0.5) * 2 * 3.1415926 * 3.1415926;
%z = (getRandom() - 0.5) * 2 * 3.1415926 * 3.1415926;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%vector = MatrixMulVector(%mat, %vec);
%velocity = VectorAdd(%velocity, %vector);
//%velocity = VectorAdd(%velocity, %randomVariance);
%velocity = VectorScale(%velocity, %this.clusterVelocity[%i]);
//%inheritedVelocity = VectorScale(%objVelocity, %this.clusterVelocityInheritance[%i]);
%inheritedVelocity = VectorScale(%objVelocity, %vector[%i]);
%velocity = VectorAdd(%velocity, %inheritedVelocity);
//%velocity = VectorAdd(%velocity, %vector);
//%p = new GrenadeProjectile()
%p = new LinearProjectile()
{
datablock = %this.clusterProjectile[%i];
initialVelocity = %velocity;
initialPosition = %position;
sourceObject = %obj.client.player;
sourcePlayer = %obj.client;
sourceSlot = %slot;
client = %obj.client;
stats = %obj.clusterStats[%i];
};
%p.setArmed(false);
MissionCleanup.add(%p);
%angle += %angleOffset;
%p.schedule(400, "Explode";
}
}
}