Blockland Forums > Modification Help

The M41-A Pulse Rifle

Pages: << < (9/29) > >>

NEVER BACK DOWN:

You there?.

NEVER BACK DOWN:

well my servers up hope u come :cookieMonster: :cookie:

Midway Sentinel:

bump for poll

edit: be sure to comment if you have a way the grenade should behave that isn't listed

Derroith:

Your turning into one of my favorite modelers.

Midway Sentinel:

thanks.

and btw. UPDATE: Grenade launcher is now working, but i still need this:


--- Quote from: Midway Sentinel on August 05, 2011, 01:05:07 AM ---
--- Code: ---   function Armor::onTrigger(%this, %player, %slot, %val)
   {
      if(%player.getMountedImage(0) $= M41AImage.getID() && %slot $= 4 && %val)
      {
         if(%player.lastGrenade !$= "" && getSimTime() - %player.lastGrenade < 3000)
         {
            return;
         }
         %projectile = grenadeProjectile;
         %vector = %player.getMuzzleVector(0);
         %objectVelocity = %player.getVelocity();
         %vector1 = VectorScale(%vector, %projectile.muzzleVelocity);
         %vector2 = VectorScale(%objectVelocity, %projectile.velInheritFactor);
         %velocity = VectorAdd(%vector1,%vector2);
         %p = new Projectile()
         {
            dataBlock = %projectile;
            initialVelocity = %velocity;
            initialPosition = %player.getMuzzlePoint(0);
            sourceObject = %player;
            sourceSlot = 0;
            client = %player.client;
         };
         %player.lastGrenade = getSimTime();
         serverPlay3D(grenadeFireSound,%player.getPosition());
         MissionCleanup.add(%p);
         return %p;
      }
      Parent::onTrigger(%this, %player, %slot, %val);
   }

--- End code ---
could someone modify it to:

1. play an animation on the weapon after/as it fires (i will name it later)
2. set the node if fires from to a MS3D node called "glmuzzlePoint"

--- End quote ---


Pages: << < (9/29) > >>

Go to full version