Hmm, it is another shotgun. ;DAnyhow, it also plays the fire animation and fire sound when there is smoke and i see it is not supposed to do that...I guess you want it to hold fire when it is cooling down?
function liberatorImage::onFire(%this,%obj,%slot){ if(%obj.getDamagePercent() < 1.0) { %obj.playThread(2, plant); } %projectile = %this.projectile; //Leave this as it is, it will automatically take the right projectile %spread = 0.0028; //Spread %shellcount = 9; //amount of shells that will be shot 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); }}
Your weapon is basically a edit of the Gun.
Ah. Thank you. Where about should i put that in the script?
Arn't most weapons an edit of the gun? Hurp derp.
Not the good ones that are made by uber scripters will tons of time on their hands.