Author Topic: Two different projectiles.  (Read 1627 times)

Thats why I said to change %obj.getposition() to %obj.initialposition.

Ah, sorry, I should'w told you I tried it too. Sorry, my fault. Again.

Depending on the angle, the distance where the projectile runs function 1 varies, and sometimes doesn't run function 2 at all. I'm beginning to think that the script for two projectiles is the way to go.

I know I'm asking a lot, but please help me.

Are you trying to get it to shoot two projectiles (primaryProjectile and secondaryProjectile) or one projectile with two different effects? (The simplierProjectile scripts)

What is the name of the weapon image you are using?

I tried both, but looking for the two projectiles.
My weaponimage is as it's stated.

Sorry for the shameless self-bump, but if someone would fix
Quote
function 2projectilegunImage::onFire(%this, %obj, %slot)
{
  %projectile = primaryProjectile;
  %projectile1 = secondaryProjectile;
  %p = new Projectile()
  {
         dataBlock = %projectile;
         initialVelocity = vectorScale(%obj.getMuzzleVector(%slot),%projectile.muzzleVelocity);
         initialPosition = %obj.getMuzzlePoint(%slot);
         sourceObject = %obj;
         sourceSlot = %slot;
         client = %obj.client;
  };
  MissionCleanup.add(%p);
  %v = new Projectile()
  {
         dataBlock = %projectile1;
         initialVelocity = vectorScale(%obj.getMuzzleVector(%slot),%projectile1.muzzleVelocity);
         initialPosition = %obj.getMuzzlePoint(%slot);
         sourceObject = %obj;
         sourceSlot = %slot;
         client = %obj.client;
  };
  MissionCleanup.add(%v);
}
and test if it works ingame. I don't mind testing it myself, It's just that it usually takes a long time before I get answered. Sorry for all the trouble.

I figured it out myself. Thanks for the help!