1
Clan Discussion / Re: blo - blown away by blo
« on: April 08, 2016, 08:29:13 PM »
Blobo. 'nuff said.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
You'd have to think of this gun as more of a risk / reward kind of gun. I'd prefer both versions, one with a list and one without
hell could you add in a sword projectile as well (short range and all)
You should read a bit more carefully, Blobo.
function SuperswordImage::onFire(%this,%obj,%slot)
{
if(!%obj.lastSuperSword)
{
%obj.lastSuperSword = getSimTime();
}
%spread = 00;
%vector = %obj.getEyeVector(%slot);
%vector = VectorScale(%vector, 35);
%x = (getRandom() - 0.5) * %spread;
%y = (getRandom() - 0.5) * %spread;
%z = (getRandom() - 0.5) * %spread;
%mat = MatrixCreateFromEuler(%x SPC %y SPC %z);
%velocity = MatrixMulVector(%mat, %vector);
%p = new projectile()
{
dataBlock = SuperswordProjectile;
initialVelocity = %velocity;
initialPosition = %obj.getEyePoint(%slot);
sourceObject = %obj;
sourceSlot = %slot;
client = %obj.client;
};
if((%obj.lastSuperSword + 1000) <= getSimTime())
{
%obj.lastSuperSword = getSimTime();
new projectile()
{
dataBlock = SuperswordSwordProjectile;
initialVelocity = %velocity;
initialPosition = %obj.getEyePoint(%slot);
sourceObject = %obj;
sourceSlot = %slot;
client = %obj.client;
};
}
MissionCleanup.add(%p);
return %p;
}
// When firing from a point offset from the eye, muzzle correction
// will adjust the muzzle vector to point to the eye LOS point.
// Since this weapon doesn't actually fire from the muzzle point,
// we need to turn this off.
correctMuzzleVector = false;
function SuperswordImage::onFire(%this,%obj,%slot)
{
if(!%obj.lastSuperSword)
{
%obj.lastSuperSword = getSimTime();
}
%spread = 00;
%vector = %obj.getMuzzleVector(%slot);
%vector = VectorScale(%vector, 35);
%x = (getRandom() - 0.5) * %spread;
%y = (getRandom() - 0.5) * %spread;
%z = (getRandom() - 0.5) * %spread;
%mat = MatrixCreateFromEuler(%x SPC %y SPC %z);
%velocity = MatrixMulVector(%mat, %vector);
%p = new projectile()
{
dataBlock = SuperswordProjectile;
initialVelocity = %velocity;
initialPosition = %obj.getMuzzlePoint(%slot);
sourceObject = %obj;
sourceSlot = %slot;
client = %obj.client;
};
if((%obj.lastSuperSword + 1000) <= getSimTime())
{
%obj.lastSuperSword = getSimTime();
new projectile()
{
dataBlock = SuperswordSwordProjectile;
initialVelocity = %velocity;
initialPosition = %obj.getMuzzlePoint(%slot);
sourceObject = %obj;
sourceSlot = %slot;
client = %obj.client;
};
}
MissionCleanup.add(%p);
return %p;
}