Blockland Forums > Modification Help
The M41-A Pulse Rifle
<< < (6/29) > >>
Midway Sentinel:
i cant release until i get someone to script the GL part of the gun, sorry
Mushroom man:

--- Quote from: Midway Sentinel on August 04, 2011, 11:14:56 PM ---i cant release until i get someone to script the GL part of the gun, sorry

--- End quote ---
Why not look at the scripts for the G36C or Sgt.A.Walters weapons?
Midway Sentinel:
i am probably gonna ask Walter to do so once he returns from the trip he's on. i guess ill take a peek at the G36c though
Midway Sentinel:
sorry for dbl post,

i looked at the g36c, and got the script:

--- 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 = GlrenadeProjectile;
         %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(rocketFireSound,%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"
?
NEVER BACK DOWN:
midway may i ask can u oneday make the xm8???
Navigation
Message Index
Next page
Previous page

Go to full version