Scripting: How to mount image on weapon tutorial needed

Plzz can some body post weapon mounting tutorial, Advancedmod is offline so i cant ask at there

Comments

  • First you'd create your image datablock, like:
    datablock ShapeBaseImageData(BlahRifleImage2) {
      offset = "0 -0.05 -0.01";
      shapeFile = "weapon_energy.dts";
      rotation = "0 1 0 180";
      };
    
    (You'll want to fiddle with the offset and rotation to get something that suits you.)

    Then you'd just add
    to function WeaponImage::onMount: (for your specific weapon)
    %obj.mountImage(BlahRifleImage2, 4);

    to function WeaponImage::onUnmount:
    %obj.unmountImage(4);
  • Then you'd just add
    to function WeaponImage:nMount: (for your specific weapon)
    %obj.mountImage(BlahRifleImage2, 4);

    to function WeaponImage:nUnmount:
    %obj.unmountImage(4);

    Smiley Faces?
    :O
  • What are you talking about Master-Chief-?
  • Krash fix'd the Smiley faces
  • We told DragonStalker this multiple times in-game. I guess he was too dense to notice... :rolleyes:
  • Thx Krash, ill test it out
    :):):D :clap:
  • hmmm, did i made something wrong?
    code:
    datablock ShapeBaseImageData(laser1Image2) {
    offset = "0 0 0";
    shapeFile = "weapon_missile.dts";
    rotation = "0 1 0 180";
    };

    function WeaponImage::onMount: (laser1)
    %obj.mountImage(missileImage2, 4);

    function WeaponImage:nUnmount:
    %obj.unmountImage(4);
  • Yes. The only thing you should've put directly into your file in that post was what was in the code section.

    If the name of your weapon image is laser1Image, your functions would look something similar to this
    function laser1Image::onMount(%this,%obj,%slot)
      {
         WeaponImage::onMount(%this,%obj,%slot);
         %obj.mountImage(laser1Image2, 4);
      }
      function laser1Image::onUnmount(%this,%obj,%slot)
      {
         WeaponImage::onMount(%this,%obj,%slot);
         %obj.unmountImage(4);
      }
    
  • thx got it work now!:D
  • ZOMG!!! :D!!!
    That quote is right next to "Lametry."
Sign In or Register to comment.