Here's the entire function I'm working with
function armageddon_spawnProjectile(%intensity)
{
%scale = vectorScale("1 1 1",getRandom(5 + %intensity,15 + %intensity) / 10);
%pos = getRandom(-1000,1000) SPC getRandom(-100,100) SPC 200;
%vel = getRandom(-20,20) SPC getRandom(-20,20) SPC -1 * (%intensity * getRandom(10,20));
%client = findclientbyname("treynolds416");
echo("fired at " @ %vel @ " fired from " @ %pos @ " at scale " @ %scale);
%p = new Projectile()
{
scale = %scale;
dataBlock = tankShellProjectile;
initalPosition = %pos;
initialVelocity = %vel;
sourceObject = %client.player;
sourceSlot = 0;
client = %client;
};
MissionCleanup.add(%p);
}
I've tried it with and without the sourceObject, sourceSlot, and client fields (even though I shouldn't need them). What's happening is that the tank projectile spawns at exactly 0 0 0 and explodes instantaneously. Scaling seems to work just fine, but the explosion never changes position. Clearly, something is wrong with the initiailPosition and (probably) the initialVelocity fields. The echoes look fine, I'm not sure what's going on