Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Adjusting the Muzzle Flash of a Weapon

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adjusting the Muzzle Flash of a Weapon

    I am working on a weapon, its just about finished. I am wondering if there is a way to adjust the muzzle flash location. I can't seem to figure what it is called, and the flash is way off.
    Also I need to lower the 1st person mesh a little, but when I do the bones don't move, so if I move it, the projectiles don't line up with where the gun barrel when firing.
    I tried setting up sockets, but I'm not sure if it's working correct.

    Other than these 2 things, the weapon works well with firing and effects.
    Anyone have any suggestions or something on wiki to point me to.

  • #2
    this is a good tutorial on setting up dummies for the weapon on 3dsmax this video works for ut3 and ut2004
    https://youtu.be/LALiWI2MAg8?list=PL99BB7F255E7526F4

    Comment


    • #3
      Ok cool thank you for the link, I will have to look over the video more closely.
      I just wanted to add some other info, maybe anyone could clear up to make this easier for me.

      I wanted to try importing a different mesh to use for a weapon. Now I tried rigging the model to the LinkGun bones from UT2004 in Milkshape3D.
      After I imported the model back into unrealed, all seems to work other than what I mentioned.
      Can I do any fixes in Milkshape to make this work or do I need to use something like 3dsmax to adjust the direction of the bones?

      The animations seem to work in game. I noticed in the animation browser I see that not only does the model have 3 bones like the LinkGun did (that I used for a basis).
      It also has 2 dummy bones as well. When I seen that I went into Milkshape and deleted the 2 dummy bones and left the original 3, and then imported back into unrealed.
      Well in Milkshape I did delete the 2 dummies and it shows that they are gone, the 2 dummy bones seem to still show in unreal ed, along with the 3 others(boneweapon,boneflashA,boneflashB).
      I am still new to this but anyway, I'm just trying to familiarize myself with what needs to work.

      Comment


      • #4
        Anyone know if there is a way to adjust the muzzle flash by changing some code for the weapon.
        Also if that is not an option, is there a way to do it in Blender or Milkshape that someone could help me with.

        Comment


        • #5
          Umodel (assuming you exported the Linkgun model from UT2k4 to rig your model to) used to screw-up the rotation of the bones so that when you reimported them, they could no longer link up with the animation (unless you exported it and reimported it too). Check this UDN Two site on skeletal dummies to create the sockets in your model. As for adjusting rotation/location in code, see this example from the Assault Rifle's weapon fire code (the socket adjustment in UEd is usually the better way to go though).

          Code:
          class AssaultFire extends InstantFire;
          ...
          function InitEffects()
          {
              Super.InitEffects();
              if ( FlashEmitter != None )
          		Weapon.AttachToBone(FlashEmitter, 'tip');
          }
          
          function FlashMuzzleFlash()
          {
              local rotator r;
              r.Roll = Rand(65536);
              Weapon.SetBoneRotation('Bone_Flash', r, 0, 1.f);
              Super.FlashMuzzleFlash();
          }
          I believe you could use the SetRelativeLocation function on the muzzle flash if you wanted to adjust its location after attaching it to the bone 'tip' (or whatever you name the attach socket in UEd).

          Comment


          • #6
            Ok I think its coming along now.
            I posted few days ago, must have forgotten to push the 'post' button.
            Yes on the Umodel extract, and reimporting the animations. For some reason when I import the mesh already had dummies.
            I looked into it a couple days ago, I changed something and it kinda showed some results, but now 2 days later I can't get the muzzle flash to even show up.
            I just need to back track a little, reapply the socket adjustments, which for some reason weren't working when I originally tried modifying the values.
            Well I really think this is working, I will post my results.
            Thank you sir for your help again.

            Comment


            • #7
              I changed the socket bones to the Dummy02 bones that the weapon had, and it seems to work now. Not sure if that was what I was suppose to do but it is working now. When you mentioned the sockets, I figured that is what to change.
              I also adjusted the ProjSpawnOffset for the projectile and its working. Thanks for the help, I may post a link to test if anyone is interested.

              Comment

              Working...
              X