Author Topic: Gun doesn't attach to my hand ingame. [SOLVED]  (Read 1529 times)

I recently decided to pick up an old failed addon of mine, I've made a lot of progress but the gun still doesn't attach correctly to the blockhead's hand.
What the gun looks like ingame:What it looks like in blender 2.49bmountpoint and muzzlepoint, muzzlepoint works correctly but it might be the cause of the problem for some reason.

« Last Edit: December 29, 2013, 01:32:28 PM by Paradon »

PM me the blend and I'll tell you what is wrong in five minutes.
http://www.pasteall.org/blend/


Your transformations are messed up. I'm not entirely sure why it's mounting like that but here's how to fix it:
  • Select mountPoint armature (Not bone) > Shift + S > Cursor to Selected
  • Select all > Alt + P > Clear and Keep Transformation
  • With everything selected right click one object to make it active > Editing tab > Mesh Panel > Center Cursor
  • Select both empties > Shift + S > Selection to Cursor
  • Redo your parenting

Ah, I see why. Watch your casing, the points are:

mountPoint
muzzlePoint

Unless it's just Blender, I don't use it.

Your transformations are messed up. I'm not entirely sure why it's mounting like that but here's how to fix it:
  • Select mountPoint armature (Not bone) > Shift + S > Cursor to Selected
  • Select all > Alt + P > Clear and Keep Transformation
  • With everything selected right click one object to make it active > Editing tab > Mesh Panel > Center Cursor
  • Select both empties > Shift + S > Selection to Cursor
  • Redo your parenting
Should I do this to all the objects?

Yes. Basically, Blender has fits if the mountPoint and empties aren't centered on items and (sometimes) vehicles. Wheels, however, require that the wheel itself be at the center, and the empties' location doesn't seem to matter.

Yes. Basically, Blender has fits if the mountPoint and empties aren't centered on items and (sometimes) vehicles. Wheels, however, require that the wheel itself be at the center, and the empties' location doesn't seem to matter.
Ok I'm almost done but it's kinda hard to do parenting if the empties are on top of each other.

Ok I'm almost done but it's kinda hard to do parenting if the empties are on top of each other.
Open up a hierarchy panel.

Should I do this to all the objects?
It should work if you carefully follow the instructions.

Ok I'm almost done but it's kinda hard to do parenting if the empties are on top of each other.
Select the same spot on the screen again. It will cycle through all objects on top of each other. It doesn't work 100% perfectly but if you just keep clicking it will eventually select the other ones. Or use the hierarchy/outliner panel. Very very few people seem to know about these techniques because I have literally only see two blend files that weren't made by me that had empties on top of each other. Everyone else just moves them to some random spot.

Ok I got it working correctly ingame. Now I just gotta fix the colors and toy around with server.cs.

What am I supposed to rename when I want to give something color ingame?
Is the correct way to color something ingame to rename some stuff in blender and then create a single color png with the same name?

blank if you want to use colorshift.

blank if you want to use colorshift.
I just figured it out by myself a moment ago but thanks anyways.

I created new sound files for my weapon but now it doesn't show up ingame at all. One of the sounds ("explosion") is just the default rocket explosion sound and the gunshot sound ("pipe") is a sound I downloaded online.

Bolded parts is what I changed.


Quote
//audio
datablock AudioProfile(ExplosiveSMGShot1Sound)
{
   filename    = "./pipe.wav";
   description = AudioClose3d;
   preload = true;
};
datablock AudioProfile(bulletHitSound)
{
   filename    = "./explosion.wav";
   description = AudioClose3d;
   preload = true;
};