Blockland Forums > Modification Help
BKT Project Thread: yar
ShadowsfeaR:
--- Quote from: johnnyboy on May 19, 2011, 02:53:53 AM ---Why hasn't anyone made a directional blast claymore?
Shouldn't be that hard, right?
Right?
--- End quote ---
No, you have no scripting experience. It's not just putting in words that MIGHT make sense to the engine and expecting it to comply. Eg:
START SCRIPT
WHEN PLAYER GOES BY CLAMORE
EXPLODE
DIRECTION FRONT-WAYS
END SCRIPT.
No, not even close. It's a long slur of stuff that even I find hard to comprehend. Zloff, do the honors of posting a sliver of real script.
abaca:
Will you ever sell this?
Red Cube:
What really, really, really needs to be made is the USP Tactical. That gun is beasty.
--- Quote from: patton360 on May 19, 2011, 11:04:47 AM ---make uzi pls
--- End quote ---
In my opinion, I can't see and Uzi in this pack. I'm not making it, though, so I have no control over whether it will be added. They already have a lot on their plates, so I expect that any more gun suggestions will not be taken.
ShadowsfeaR:
I already made a USP. I just forgot I had it. :3
Zloff:
Everyone wants the USP. The M-45 is close enough to one, and is better Oh ok then I guess that works ._. and uhh, send me pictures of any finished gun that you have that you'd like to add into this pack, so people don't request things that you already have. Through Email of course, since you can't send PM's anymore :c
--- Quote from: ShadowsfeaR on May 19, 2011, 11:23:04 AM ---No, not even close. It's a long slur of stuff that even I find hard to comprehend. Zloff, do the honors of posting a sliver of real script.
--- End quote ---
--- Code: ---function M9A1Fire(%this,%obj,%slot,%val,%triggerNum)
{
%projectile = BerettaM9Projectile;
if (%obj.heat > 4)
{
%obj.playThread(3, shiftAway);
}
else if (%obj.heat > 1)
{
%obj.playThread(3, plant);
}
if(%obj.isImageMounted(BerettaM9Image))
{
if(%triggerNum == 3 && %val)
{
%spread = 0.00075 + (%obj.heat * 0.00025);
}
else
if(vectorLen(%obj.getVelocity()) < 4)
{
%spread = 0.00125 + (%obj.heat * 0.00025);
}
else
{
%spread = 0.002 + (%obj.heat * 0.00025);
}
}
else if(%obj.isImageMounted(BerettaM9ADSImage))
{
if(%triggerNum == 4 && %val)
{
%spread = 0.00035 + (%obj.heat * 0.00025);
}
else
if(vectorLen(%obj.getVelocity()) < 4)
{
%spread = 0.0009 + (%obj.heat * 0.00025);
}
else
{
%spread = 0.0014 + (%obj.heat * 0.00025);
}
}
%obj.maxHeat = 10;
if(%obj.heat < %obj.maxHeat)
%obj.heat += 2;
%shellcount = 1;
for(%shell=0; %shell<%shellcount; %shell++)
{
%vector = %obj.getMuzzleVector(%slot);
%objectVelocity = %obj.getVelocity();
%vector1 = VectorScale(%vector, %projectile.muzzleVelocity);
%vector2 = VectorScale(%objectVelocity, %projectile.velInheritFactor);
%velocity = VectorAdd(%vector1,%vector2);
%x = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
%y = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
%z = (getRandom() - 0.5) * 10 * 3.1415926 * %spread;
%mat = MatrixCreateFromEuler(%x @ " " @ %y @ " " @ %z);
%velocity = MatrixMulVector(%mat, %velocity);
%p = new (%this.projectileType)()
{
dataBlock = %projectile;
initialVelocity = %velocity;
initialPosition = %obj.getMuzzlePoint(%slot);
sourceObject = %obj;
sourceSlot = %slot;
client = %obj.client;
};
MissionCleanup.add(%p);
}
%projectile = "FlashProjectile";
%vector = %obj.getMuzzleVector(%slot);
%objectVelocity = %obj.getVelocity();
%vector1 = VectorScale(%vector, %projectile.muzzleVelocity);
%vector2 = VectorScale(%objectVelocity, %projectile.velInheritFactor);
%velocity = VectorAdd(%vector1,%vector2);
%p = new (%this.projectileType)()
{
dataBlock = %projectile;
initialVelocity = %velocity;
initialPosition = %obj.getMuzzlePoint(%slot);
sourceObject = %obj;
sourceSlot = %slot;
client = %obj.client;
};
MissionCleanup.add(%p);
return %p;
}
--- End code ---
That's what makes the bullets spread out
--- Quote from: abaca on May 19, 2011, 04:44:59 PM ---Will you ever sell this?
--- End quote ---
Hell yes we'll take money for this It's going to be publicly released, free of charge to download, but that's later
Edit: Got to make up unfinished work and study for exams, so I'll be scripting less than I have been the past few weeks, if not, not at all for a couple days