Author Topic: Gun duplicate doesn't work ... exactly as intended  (Read 413 times)

I have a gun which is supposed to act exactly like the original default gun, except that it has ammo, no projectile, and no sounds.

Code: [Select]
datablock ShapeBaseImageData(SpaceGunImage : GunImage)
{
casing = SpaceGunShellDebris;
colorShiftColor = "0.1 0.1 0.1 1";
correctMuzzleVector = 0;
item = SpaceGunItem;
projectile = "";

stateScript[0] = "onDraw";
stateSound[0] = "";
stateTransitionOnTimeout[0] = "AmmoCheck";
stateSound[2] = "";
stateSequence[4] = "AmmoCheck";
stateTransitionOnTriggerUp[4] = "AmmoCheck";

stateName[5] = "AmmoCheck";
stateTransitionOnAmmo[5] = "Ready";
stateTransitionOnTriggerDown[5] = "DryFire";
stateSequence[5] = "AmmoCheck";

stateName[6] = "DryFire";
stateScript[6] = "onDryFire";
stateSequence[6] = "DryFire";
stateTransitionOnTriggerUp[6] = "AmmoCheck";
};

Everything works fine, except for the minor hitch where when the gun fires, the slide doesn't completely return to its starting position like on the default gun, which causes it to visibly jump a couple pixels forward when the mouse button is released.

Does anyone know why this is happening and how to fix it?

TGE state systems are infamous for being entirely broken when it comes to anything related to actually functioning. The solution will most likely involve random tiny modifications to model bone positions, sequence timing, state splitting/mixing and/or completely rewriting everything a few times.

TGE state systems are infamous for being entirely broken when it comes to anything related to actually functioning. The solution will most likely involve random tiny modifications to model bone positions, sequence timing, state splitting/mixing and/or completely rewriting everything a few times.

Well in that case, forget it. It's not a big enough issue for that.