61
General Discussion / Re: Your Own Building Code
« on: January 02, 2014, 01:52:26 AM »DAMNIT I WAS JUST ABOUT TO DO THIS.I got a 3 replies warning because I waited 20 minutes to post
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.
DAMNIT I WAS JUST ABOUT TO DO THIS.I got a 3 replies warning because I waited 20 minutes to post
whathe's talking about a race circuit, not an electronic component
I don't think you need to do that anymore. It's a default add-on and you'd be stupid to not enable it. JS.I don't enable the rocket launcher
function vectorSpread(%vector, %spread) {
%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 SPC %y SPC %z);
return vectorNormalize(matrixMulVector(%mat, %vector));
}
function mImage::onFire(%data,%obj,%slot)
{
%count=mFloor(%data.projectileCount);
%spread=%data.projectileSpread;
if(!%count)
%count=1;
%projectile = %data.projectile;
%vector = %obj.getMuzzleVector(0);
%muzzle = %obj.getMuzzlePoint(0);
for(%i=0;%i<%count;%i++)
{
%proj = new Projectile()
{
datablock = %projectile;
sourceObject = %obj;
sourceSlot = %slot;
client = %obj.client;
initialPosition = %muzzle;
initialVelocity = vectorScale(vectorSpread(%vector,%spread),%projectile.muzzleVelocity);
};
%proj.setScale("1 1 1");
MissionCleanup.add(%proj);
}
}

When the bomb and weapons are finished I could add a shop system to my map using events and actually set it up to be playable.gross, events
tell me howspoon feeding is bad here