To be specific:
I've made an IQM Model of Arms and a Pistol with the intentions of attaching the Pistol Model later.
For now, I have a ModelDef, a ZScript file, and made the necessary additions to display the Arms model, which it does!
But when I use the weapon, it goes through the first set animation once then freezes completely, unable to switch to another weapon (not without dropping it with the drop command)
It seems to be reading the animations properly, but is getting stuck at the very first state called and I don't know why. I'd guess there's something wrong with the frame duration?
I'll paste the ZScript file for now then add the PK3 if need be
The ZScript:
Code: Select all
Class Model70 : Weapon
{
Default
{
Weapon.SlotNumber 1;
Weapon.AmmoType "Clip";
Weapon.AmmoGive 32;
Weapon.AmmoUse 1;
+DECOUPLEDANIMATIONS
}
States
{
Spawn:
MD70 A -1 NoDelay
{
A_SetAnimation("Pistol_Fire");
}
Stop;
Ready:
MD70 A -1
{
A_SetAnimation("Pistol_Reload");
A_WeaponReady;
}
Loop;
Select: //As of now, the weapon plays the animation in this state once then freezes, making it un-switchable with any other weapon
MD70 A -1
{
A_SetAnimation("Pistol_Fire");
A_Raise;
}
Loop;
Deselect:
MD70 A -1
{
A_SetAnimation("Pistol_Fire");
A_Lower;
}
Loop;
Fire:
MD70 A -1
{
A_SetAnimation("Pistol_Fire");
A_FireBullets(1, 1, 1, 1);
}
GoTo Ready;
Reload:
MD70 A -1
{
A_SetAnimation("Pistol_Reload");
}
GoTo Ready;
}
}