I hope so, considering how infrequent I've been in comming here, but thats irrevent. I have a perplexing cog problem. I have two weapon cogs, one to replace fists (weap_pistol), and one to replace raildet (weap_HW). What happens is that when both cogs are in teh gob, when you select raildet (HW), the game crashes, however fists (pistol) works just fine. However, when fists (pistol) is not in the gob, raildet (HW) works just fine, same is true visa verca.
I am stumped, I'm hope someone has any suggestions or insight or a solution to this problem I have.
Code:
# Jedi Knight Cog Script
#
# WEAP_PISTOLS.COG
#
# WEAPON Script - Pistols
#
# [DP]
#
flags=0x240
symbols
model povModel=92fsv.3do local
model weaponMesh=92fsg.3do local
keyframe mountAnim=p99Vmnt.key local
keyframe dismountAnim=p99Vdis.key local
keyframe povfireAnim=92fsvfire.key local
keyframe chamberAnim=92fsvchamber.key local
keyframe reloadAnim=p99vreload.key local
keyframe holsterAnim=kyhlstr.key local
sound mountSound=df_rif_ready.wav local
sound dismountSound=PutWeaponAway01.wav local
sound fireSound=92FS.wav local
sound chamberSound=chamber.wav local
sound reloadSound=reload.wav local
sound outSound=concuss1.wav local
flex powerBoost local
flex autoAimFOV=30 local
flex autoAimMaxDist=5 local
flex holsterWait local
flex fireWait=0.08 local
flex acc=2.5 local
int dummy local
template projectile=+bullet9mm local
thing player local
thing weapthing local
int trackID=-1 local
int mode local
int holsterTrack local
int selectMode=1 local
int canFire local
int rounds=16 local
int reloading local
int chambered local
int clipsize local
vector randvect local
template weapdummy=+weapdummy local
template ldummy=+chdummy local
message startup
message newplayer
message pulse
message activated
message deactivated
message selected
message deselected
message autoselect
message fire
message timer
message user0
end
# ========================================================================================
code
Startup:
Newplayer:
SetInv(player, 129, 4);
call setgun;
Return;
# ........................................................................................
Pulse:
If(GetThingHealth(player) <= 0)
{
If(weapThing != -1) DestroyThing(weapThing);
weapThing = -1;
SetPulse(0);
Return;
}
If(GetCurrentCamera())
{
SetThingCurGeoMode(weapThing, 0);
Return;
}
SetThingCurGeoMode(weapThing, GetThingGeoMode(weapThing));
SetThingPos(weapThing, GetThingPos(player));
dummy = FireProjectile(player, ldummy, -1, -1, '0 0 0', '0 0 0', 0,0,0,0);
SetThingLook(weapThing, GetThingLvec(dummy));
DestroyThing(dummy);
Return;
# ........................................................................................
Fire:
// Check that the player is still alive.
if(GetThingHealth(player) <= 0)
Return;
If(!canFire) Return;
If(reloading) Return;
If(rounds <= 0)
{
PlaySoundThing(outSound, player, 1.0, -1, -1, 0x80);
Return;
}
SetPOVShake('0.0 0 0.0', '5 0 0', .05, 80.0);
randvect = VectorSet((.5-Rand())*acc, (.5-Rand())*acc, 0);
If(IsThingCrouching(player)) randvect = VectorScale(randvect, .9);
If(IsThingMoving(player)) randvect = VectorScale(randvect, VectorLen(GetThingVel(player))*.6 + 1);
PlayMode(player, 8);
SendTrigger(-1, 10, 0.0135, 0.12, 0.01, 0);
SendTrigger(-1, 11, player, projectile, VectorX(randvect), VectorY(randvect));
// SendTrigger(-1, 10, 0.0135, 0.09, 0.02, 0);
// SendTrigger(-1, 12, player, case, 0, 0);
PlayKey(weapThing, povFireAnim, 1, 0x1a);
rounds = rounds - 1;
SetInv(player, 14, rounds/clipsize*400);
PlaySoundThing(fireSound, player, 1, -1, -1, 0x80);
ChangeFireRate(player, fireWait);
canFire = 0;
Return;
# ........................................................................................
Activated:
player = GetSourceRef();
mode = GetSenderRef();
If(reloading) Return;
If(rounds <= 0) Return;
jkSetWaggle(player, '0.0 0.0 0.0', 0);
powerBoost = GetInv(player, 63);
ActivateWeapon( player, fireWait, mode );
Return;
# ........................................................................................
Deactivated:
player = GetSourceRef();
mode = GetSenderRef();
If(rounds <= 0) call reload;
jkSetWaggle(player, '10.0 7.0 0.0', 350);
DeactivateWeapon( player, mode );
canFire = 1;
Return;
# ........................................................................................
selected:
player = GetSourceRef();
// Play external mounting animation
PlayMode(player, 41);
// Setup the meshes and models.
weapThing = CreateThing(weapdummy, player);
AttachThingToThingEx(weapThing, player, 0x8);
SetThingModel(weapThing, povModel);
SetArmedMode(player, 1);
jkSetWeaponMesh(player, weaponMesh);
// Play mounting sound.
PlaySoundThing(mountSound, player, 1.0, -1.0, -1.0, 0x80);
// Play the animation (NOLOOP + UNIQUE + ENDPAUSE).
// The animation is held at the last frame after it is played.
trackID = PlayKey(weapThing, mountAnim, 0, 0x14);
SetMountWait(player, GetKeyLen(mountAnim));
// Clear saber flags, and allow activation of the weapon
jkClearFlags(player, 0x5);
SetCurWeapon(player, 1);
SetPulse(.003);
SetInv(player, 14, rounds/clipsize*400);
canFire = 1;
reloading = 0;
Return;
# ........................................................................................
deselected:
player = GetSourceRef();
PlaySoundThing(dismountSound, player, 1.0, -1, -1, 0x80);
PlayKey(weapThing, dismountAnim, 0, 0x12);
holsterWait = GetKeyLen(holsterAnim);
SetMountWait(player, holsterWait);
holsterTrack = PlayKey(player, holsterAnim, 1, 0x4);
SetTimerEx(holsterWait, 2, 0.0, 0.0);
if (trackID != -1)
{
jkStopPOVKey(player, trackID, 0);
trackID = -1;
}
jkSetWaggle(player, '0.0 0.0 0.0', 0);
Return;
# ........................................................................................
Autoselect:
selectMode = GetSenderRef();
player = GetSourceRef();
ReturnEx(100.0);
Return;
# ........................................................................................
Timer:
If(GetSenderID() == 2)
{
StopKey(player, holsterTrack, 0);
SetPulse(0);
If(weapThing != -1) DestroyThing(weapThing);
weapThing = -1;
}
If(GetSenderID() == 3)
{
rounds = clipsize + chambered;
SetInv(player, 14, rounds/clipsize*400);
reloading = 0;
}
Return;
# ........................................................................................
User0:
call reload;
Return;
# ........................................................................................
Reload:
If(reloading) Return;
If(GetThingHealth(player) <= 0) Return;
If(rounds > 0) chambered = 1;
Else chambered = 0;
reloading = 1;
SetInv(player, 14, 0);
SetMountWait(player, GetKeyLen(chamberAnim[chambered]));
SetTimerEx(GetKeyLen(chamberAnim[chambered]), 3, 0, 0);
PlaySoundThing(chamberSound[chambered], player, 1, -1, -1, 0x80);
PlayKey(weapThing, chamberAnim[chambered], 1, 0x2);
Return;
# ........................................................................................
Setgun:
If(GetInv(player, 129) == 1) // P228
{
povModel = LoadModel("p228v.3do");
weaponMesh = LoadModel("92fsg.3do");
mountAnim = LoadKeyframe("p99Vmnt.key");
dismountAnim = LoadKeyframe("p99Vdis.key");
povfireAnim = LoadKeyframe("p99Vfire.key");
reloadAnim = LoadKeyframe("p99Vreload.key");
chamberAnim = LoadKeyframe("p99Vchamber.key");
fireSound = LoadSound("p228.wav");
acc = 2;
clipsize = 13;
projectile = LoadTemplate("+bullet9mm");
}
If(GetInv(player, 129) == 2) // 92FS
{
povModel = LoadModel("92fsv.3do");
weaponMesh = LoadModel("92fsg.3do");
mountAnim = LoadKeyframe("p99Vmnt.key");
dismountAnim = LoadKeyframe("p99Vdis.key");
povfireAnim = LoadKeyframe("92fsVfire.key");
reloadAnim = LoadKeyframe("p99Vreload.key");
chamberAnim = LoadKeyframe("92fsVchamber.key");
fireSound = LoadSound("92fs.wav");
acc = 2.4;
clipsize = 16;
projectile = LoadTemplate("+bullet9mm");
}
If(GetInv(player, 129) == 3) // Colt 1911
{
povModel = LoadModel("coltv.3do");
weaponMesh = LoadModel("coltg.3do");
mountAnim = LoadKeyframe("p99Vmnt.key");
dismountAnim = LoadKeyframe("p99Vdis.key");
povfireAnim = LoadKeyframe("p99Vfire.key");
reloadAnim = LoadKeyframe("p99Vreload.key");
chamberAnim = LoadKeyframe("92fsVchamber.key");
fireSound = LoadSound("colt.wav");
acc = 3;
clipsize = 8;
projectile = LoadTemplate("+bullet45cal");
}
If(GetInv(player, 129) == 4) // Mark23
{
povModel = LoadModel("mark23v.3do");
weaponMesh = LoadModel("92fsg.3do");
mountAnim = LoadKeyframe("p99Vmnt.key");
dismountAnim = LoadKeyframe("p99Vdis.key");
povfireAnim = LoadKeyframe("92fsVfire.key");
reloadAnim = LoadKeyframe("p99Vreload.key");
chamberAnim = LoadKeyframe("92fsVchamber.key");
fireSound = LoadSound("mark23.wav");
acc = 2.7;
clipsize = 13;
projectile = LoadTemplate("+bullet45cal");
}
If(GetInv(player, 129) == 5) // Five7
{
povModel = LoadModel("five7v.3do");
weaponMesh = LoadModel("92fsg.3do");
mountAnim = LoadKeyframe("p99Vmnt.key");
dismountAnim = LoadKeyframe("p99Vdis.key");
povfireAnim = LoadKeyframe("92fsVfire.key");
reloadAnim = LoadKeyframe("p99Vreload.key");
chamberAnim = LoadKeyframe("92fsVchamber.key");
fireSound = LoadSound("57.wav");
acc = 2.8;
clipsize = 20;
projectile = LoadTemplate("+bullet57");
}
If(GetInv(player, 129) == 6) // Desert Eagle
{
povModel = LoadModel("DEv.3do");
weaponMesh = LoadModel("92fsg.3do");
mountAnim = LoadKeyframe("p99Vmnt.key");
dismountAnim = LoadKeyframe("p99Vdis.key");
povfireAnim = LoadKeyframe("deVfire.key");
reloadAnim = LoadKeyframe("p99Vreload.key");
chamberAnim = LoadKeyframe("deVchamber.key");
fireSound = LoadSound("DE.wav");
acc = 3.4;
clipsize = 7;
projectile = LoadTemplate("+bullet50calp");
}
rounds = clipsize + 1;
Return;
endCode:
# Jedi Knight Cog Script
#
# WEAP_HW.COG
#
# WEAPON Script - Heavy Weapons
#
# [DP]
#
symbols
model povModel=mac10v.3do local
model weaponMesh=macg.3do local
keyframe mountAnim=macVmnt.key local
keyframe dismountAnim=macVdis.key local
keyframe povfireAnim=macVpst1.key local
keyframe chamberAnim=macVmnt.key local
keyframe reloadAnim=macVmnt.key local
keyframe holsterAnim=kyhlstr.key local
sound mountSound=df_rif_ready.wav local
sound dismountSound=PutWeaponAway01.wav local
sound fireSound=mac10_fire.wav local
sound outSound=concuss1.wav local
sound chamberSound=df_rif_ready.wav local
sound reloadSound=PutWeaponAway01.wav local
sound spas12reloadSound=df_rif_ready.wav local
flex powerBoost local
flex autoAimFOV=30 local
flex autoAimMaxDist=5 local
flex holsterWait local
flex fireWait local
flex acc local
flex stability local
int dummy local
template projectile=+bullet9mm local
template scope=+scopecam local
thing player local
thing weapthing local
thing scopething local
int trackID=-1 local
int reloadID=-1 local
int mode local
int holsterTrack local
int selectMode=1 local
int reloading local
int clipsize local
int chambered local
int rounds local
int firemodes local
int canFire local
int selector local
int i local
int scopeOn local
vector randvect local
template weapdummy=+weapdummy local
template ldummy=+chdummy local
int gunnum=7 local
int display=15 local
message startup
message newplayer
message pulse
message killed
message activated
message deactivated
message selected
message deselected
message autoselect
message fire
message timer
message user0
message user1
end
# ========================================================================================
code
Startup:
Newplayer:
SetInv(player, 127, 1);
SetInv(player, 115 + gunnum, 40);
call setgun;
Return;
# ........................................................................................
Pulse:
If(GetThingHealth(player) <= 0)
{
If(weapThing != -1) DestroyThing(weapThing);
weapThing = -1;
SetPulse(0);
Return;
}
If(scopeOn)
{
SetThingCurGeoMode(weapThing, 0);
If(GetInv(player, 127) == 3)
scopething = FireProjectile(player, scope, -1, -1, '0 8.1 0', '0 0 0', 0,0,0,0);
If(GetInv(player, 127) == 4)
scopething = FireProjectile(player, scope, -1, -1, '0 12.1 0', '0 0 0', 0,0,0,0);
SetThingPos(scopething, VectorAdd(GetThingPos(scopething), VectorScale(GetThingLVec(scopething), -.1)));
If(GetCurrentCamera()) CycleCamera();
SetCameraFocus(0, scopething);
Return;
}
If(GetCurrentCamera())
{
SetThingCurGeoMode(weapThing, 0);
Return;
}
SetThingCurGeoMode(weapThing, GetThingGeoMode(weapThing));
SetThingPos(weapThing, GetThingPos(player));
dummy = FireProjectile(player, ldummy, -1, -1, '0 0 0', '0 0 0', 0,0,0,0);
SetThingLook(weapThing, GetThingLvec(dummy));
DestroyThing(dummy);
Return;
# ........................................................................................
Killed:
ScopeOff:
scopeOn = 0;
SetCameraFocus(0, player);
Return;
# ........................................................................................
Fire:
// Check that the player is still alive.
if(GetThingHealth(player) <= 0)
Return;
If(reloading) Return;
If(!canFire) Return;
// Check Ammo - If we are out, autoselect best weapon.
if(GetInv(player, 115 + gunnum) < 1.0)
{
PlaySoundThing(outSound, player, 1.0, -1, -1, 0x80);
if(GetAutoSwitch() & 1)
SelectWeapon(player, AutoSelectWeapon(player, 1));
Return;
}
If(rounds <= 0)
{
PlaySoundThing(outSound, player, 1.0, -1, -1, 0x80);
Return;
}
SetPOVShake('0.0 0 0.0', '5 0 0', .05, 80.0);
i = VectorLen(GetThingVel(player))*stability;
randvect = VectorSet((.5-Rand())*(acc+i), (.5-Rand())*(acc+i), 0);
If(IsThingCrouching(player)) randvect = VectorScale(randvect, .9);
If(GetInv(player, 127) == 1)
{
For(i=0; i<8; i=i+1)
{
randvect = VectorSet((.5-Rand())*acc+(Rand()-.5)*5.5, (.5-Rand())*acc+(Rand()-.5)*5.5, 0);
SendTrigger(-1, 10, 0.0135, 0.12, 0.01, 0);
SendTrigger(-1, 11, player, projectile, VectorX(randvect), VectorY(randvect));
}
}
Else
{
SendTrigger(-1, 10, 0.0135, 0.12, 0.01, 0);
SendTrigger(-1, 11, player, projectile, VectorX(randvect), VectorY(randvect));
}
// SendTrigger(-1, 10, 0.0135, 0.09, 0.02, 0);
// SendTrigger(-1, 12, player, case, 0, 0);
PlayKey(weapThing, povFireAnim, 1, 0x1a);
PlayMode(player, 8);
PlaySoundThing(fireSound, player, 1, -1, -1, 0x80);
If(scopeOn) PlaySoundLocal(fireSound, 1, 0, 0x80);
ChangeInv(player, 115 + gunnum, -1);
ChangeInv(player, display, -1);
If(GetInv(player, 127) != 5)
{
rounds = rounds - 1;
SetInv(player, 14, rounds/clipsize*400);
}
canFire = 0;
ChangeFireRate(player, fireWait);
Return;
# ........................................................................................
activated:
player = GetSourceRef();
mode = GetSenderRef();
If(reloading) Return;
If(rounds <= 0)
{
PlaySoundThing(outSound, player, 1.0, -1, -1, 0x80);
Return;
}
If(!canFire) Return;
If(GetInv(player, 127) == 3 || GetInv(player, 127) == 4)
{
If(mode == 1)
{
If(scopeOn) call scopeoff;
Else scopeOn = 1;
Return;
}
}
jkSetWaggle(player, '0.0 0.0 0.0', 0);
powerBoost = GetInv(player, 63);
ActivateWeapon( player, fireWait, mode );
Return;
# ........................................................................................
deactivated:
player = GetSourceRef();
mode = GetSenderRef();
If(rounds <= 0)
call reload;
canFire = 1;
jkSetWaggle(player, '10.0 7.0 0.0', 350);
DeactivateWeapon( player, mode );
Return;
# ........................................................................................
selected:
player = GetSourceRef();
// Play external mounting animation
PlayMode(player, 41);
// Setup the meshes and models.
weapThing = CreateThing(weapdummy, player);
AttachThingToThingEx(weapThing, player, 0x8);
SetThingModel(weapThing, povModel);
SetArmedMode(player, 1);
jkSetWeaponMesh(player, weaponMesh);
// Play mounting sound.
PlaySoundThing(mountSound, player, 1.0, -1.0, -1.0, 0x80);
// Play the animation (NOLOOP + UNIQUE + ENDPAUSE).
// The animation is held at the last frame after it is played.
trackID = PlayKey(weapThing, mountAnim, 0, 0x14);
SetMountWait(player, GetKeyLen(mountAnim));
// Clear saber flags, and allow activation of the weapon
jkClearFlags(player, 0x5);
SetCurWeapon(player, gunnum);
// Check Ammo - If we are out, autoselect best weapon.
if(GetInv(player, 115 + gunnum) < 1.0)
{
PlaySoundThing(outSound, player, 1.0, -1, -1, 0x80);
if(GetAutoSwitch() & 1)
SelectWeapon(player, AutoSelectWeapon(player, 1));
}
SetInv(player, display, GetInv(player, 115 + gunnum));
SetPulse(.003);
reloading = 0;
SetInv(player, 14, rounds/clipsize*400);
If(rounds <= 0) call reload;
canFire = 1;
scopeOn = 0;
Return;
# ........................................................................................
deselected:
player = GetSourceRef();
PlaySoundThing(dismountSound, player, 1.0, -1, -1, 0x80);
PlayKey(weapThing, dismountAnim, 0, 0x12);
holsterWait = GetKeyLen(holsterAnim);
SetMountWait(player, holsterWait);
holsterTrack = PlayKey(player, holsterAnim, 1, 0x4);
SetTimerEx(holsterWait, 2, 0.0, 0.0);
if (trackID != -1)
{
StopKey(weapThing, trackID, 0);
trackID = -1;
}
jkSetWaggle(player, '0.0 0.0 0.0', 0);
If(reloadID != -1)
{
StopKey(weapThing, reloadID, 0);
reloadID = -1;
}
call scopeoff;
Return;
# ........................................................................................
Autoselect:
selectMode = GetSenderRef();
player = GetSourceRef();
// If the player has the weapon
if(GetInv(player, 127) != 0.0)
{
// If the player has ammo
if(GetInv(player, 115 + gunnum) > 1.0)
{
ReturnEx(gunnum*100);
}
else
{
ReturnEx(-1.0);
}
}
else
{
ReturnEx(-1.0);
}
Return;
# ........................................................................................
Timer:
If(GetSenderID() == 2)
{
StopKey(player, holsterTrack, 0);
SetPulse(0);
If(weapThing != -1) DestroyThing(weapThing);
weapThing = -1;
}
If(GetSenderID() == 3)
{
If(reloading == 2)
{
If(reloadID != -1)
{
StopKey(weapThing, reloadID, 0);
reloadID = -1;
}
reloading = 0;
Return;
}
If(GetInv(player, 127) == 1)
{
rounds = rounds + 1;
SetInv(player, 14, rounds/8*400);
If(GetInv(player, 122) > 1 && rounds < 8)
{
PlaySoundThing(spas12reloadSound, player, 1, -1, -1, 0x80);
SetMountWait(player, GetKeyLen(reloadAnim));
SetTimerEx(GetKeyLen(reloadAnim), 3, 0, 0);
Return;
}
If(reloadID != -1)
{
StopKey(weapThing, reloadID, 0);
reloadID = -1;
}
reloading = 0;
Return;
}
rounds = clipsize + chambered;
If(GetInv(player, 115 + gunnum) < clipsize + chambered)
rounds = GetInv(player, 115 + gunnum);
SetInv(player, 14, rounds/clipsize*400);
reloading = 0;
}
If(GetSenderID() == 4 && GetParam(0) < 3)
{
If(GetInv(player, 115 + gunnum) <= 0 || rounds <= 0) Return;
If(GetThingHealth(player) <= 0) Return;
randvect = VectorSet((.5-Rand())*acc*.8, (.5-Rand())*acc*.8, 0);
If(IsThingCrouching(player)) randvect = VectorScale(randvect, .9);
If(IsThingMoving(player)) randvect = VectorScale(randvect, VectorLen(GetThingVel(player))*stability + 1);
PlayMode(player, 8);
SendTrigger(-1, 10, 0.0135, 0.12, 0.01, 0);
SendTrigger(-1, 11, player, projectile, VectorX(randvect), VectorY(randvect));
// SendTrigger(-1, 10, 0.0135, 0.09, 0.02, 0);
// SendTrigger(-1, 12, player, case, 0, 0);
PlayKey(weapThing, povFireAnim, 1, 0x1a);
PlaySoundThing(fireSound, player, 1, -1, -1, 0x80);
ChangeInv(player, 115 + gunnum, -1);
ChangeInv(player, display, -1);
rounds = rounds - 1;
SetInv(player, 14, rounds/clipsize*400);
SetTimerEx(fireWait, 4, GetParam(0)+1, 0);
}
Return;
# ........................................................................................
User0:
If(GetCurWeaponMode() != -1) Return;
If(GetInv(player, 127) == 5) Return;
call reload;
Return;
# ........................................................................................
User1:
If(GetCurWeaponMode() != -1) Return;
If(selector == 1)
{
If(fireModes & 0x2) selector = 2;
Else If(fireModes & 0x4) selector = 3;
}
Else If(selector == 2)
{
If(fireModes & 0x4) selector = 3;
Else If(fireModes & 0x1) selector = 1;
}
Else If(selector == 3)
{
If(fireModes & 0x1) selector = 1;
Else If(fireModes & 0x2) selector = 2;
}
If(selector == 1) Print("Semi-Auto");
If(selector == 2) Print("3 Round Burst");
If(selector == 3) Print("Full-Auto");
Return;
# ........................................................................................
Reload:
If(GetThingHealth(player) <= 0) Return;
If(!canFire) Return;
If(GetInv(player, 127) == 5) Return;
If(reloading)
{
If(GetInv(player, 127) == 1) reloading = 2;
Return;
}
call scopeoff;
If(GetInv(player, 127) == 1)
{
If(rounds >= 8) Return;
reloading = 1;
SetMountWait(player, GetKeyLen(reloadAnim));
SetTimerEx(GetKeyLen(reloadAnim), 3, 0, 0);
PlaySoundThing(spas12reloadSound, player, 1, -1, -1, 0x80);
reloadID = PlayKey(weapThing, reloadAnim, 1, 0x0);
Return;
}
If(GetInv(player, 127) != 2 && rounds > 0)
chambered = 1;
Else chambered = 0;
reloading = 1;
SetInv(player, 14, 0);
SetMountWait(player, GetKeyLen(reloadAnim));
SetTimerEx(GetKeyLen(chamberAnim[chambered]), 3, 0, 0);
PlaySoundThing(chamberSound[chambered], player, 1, -1, -1, 0x80);
PlayKey(weapThing, chamberAnim[chambered], 1, 0x2);
Return;
# ........................................................................................
Setgun:
If(GetInv(player, 127) == 0)
{
SetInv(player, gunnum, 0);
Return;
}
SetInv(player, gunnum, 1);
If(GetInv(player, 127) == 1) // SPAS12
{
povModel = LoadModel("spasv.3do");
weaponMesh = LoadModel("spas12g.3do");
mountAnim = LoadKeyframe("spasVmnt.key");
dismountAnim = LoadKeyframe("spasVdis.key");
povfireAnim = LoadKeyframe("spasVpst1.key");
reloadAnim = LoadKeyframe("spasvreload.key");
fireSound = LoadSound("spas12_fire.wav");
fireWait = 0.8;
acc = 1.4;
stability = 1.8; // number multiplied by movement
fireModes = 0x1; // 0x1 S - 0x2 3RB - 0x4 F
clipsize = 8;
projectile = LoadTemplate("+shotgun");
}
If(GetInv(player, 127) == 2) // HK69
{
povModel = LoadModel("hk69v.3do");
weaponMesh = LoadModel("hk69g.3do");
mountAnim = LoadKeyframe("hk69Vmnt.key");
dismountAnim = LoadKeyframe("hk69Vdis.key");
povfireAnim = LoadKeyframe("hk69Vpst1.key");
reloadAnim = LoadKeyframe("hk69Vreload.key");
chamberAnim = LoadKeyframe("hk69Vreload.key");
fireSound = LoadSound("grenade_fire.wav");
fireWait = 0.1;
acc = 1.7;
stability = 3; // number multiplied by movement
fireModes = 0x1; // 0x1 S - 0x2 3RB - 0x4 F
clipsize = 1;
projectile = LoadTemplate("+grenadeshot");
}
If(GetInv(player, 127) == 3) // PSG1
{
povModel = LoadModel("psg1v.3do");
weaponMesh = LoadModel("g36kg.3do");
mountAnim = LoadKeyframe("g3a3Vmnt.key");
dismountAnim = LoadKeyframe("g3a3Vdis.key");
povfireAnim = LoadKeyframe("g3a3Vpst1.key");
reloadAnim = LoadKeyframe("g3a3Vmnt.key");
chamberAnim = LoadKeyframe("g3a3Vmnt.key");
fireSound = LoadSound("g3a3_fire.wav");
fireWait = 0.1;
acc = .015;
stability = 8; // number multiplied by movement
fireModes = 0x1; // 0x1 S - 0x2 3RB - 0x4 F
clipsize = 10;
projectile = LoadTemplate("+bullet772sniper");
}
If(GetInv(player, 127) == 4) // M82A1
{
povModel = LoadModel("m82a1v.3do");
weaponMesh = LoadModel("f2000g.3do");
mountAnim = LoadKeyframe("m82a1Vmnt.key");
dismountAnim = LoadKeyframe("m82a1Vdis.key");
povfireAnim = LoadKeyframe("m82a1Vpst1.key");
reloadAnim = LoadKeyframe("m82a1Vmnt.key");
chamberAnim = LoadKeyframe("m82a1Vmnt.key");
fireSound = LoadSound("hk21_fire.wav");
fireWait = 0.1;
acc = .02;
stability = 13; // number multiplied by movement
fireModes = 0x1; // 0x1 S - 0x2 3RB - 0x4 F
clipsize = 10;
projectile = LoadTemplate("+bullet50cal");
}
If(GetInv(player, 127) == 5) // RPG
{
povModel = LoadModel("RPGv.3do");
weaponMesh = LoadModel("f2000g.3do");
mountAnim = LoadKeyframe("rpgVmnt.key");
dismountAnim = LoadKeyframe("rpgVdis.key");
povfireAnim = LoadKeyframe("rpgVpst1.key");
reloadAnim = LoadKeyframe("rpgVmnt.key");
chamberAnim = LoadKeyframe("rpgVmnt.key");
fireSound = LoadSound("hk21_fire.wav");
fireWait = 1;
acc = .2;
stability = 9; // number multiplied by movement
clipsize = 1;
fireModes = 0x1; // 0x1 S - 0x2 3RB - 0x4 F
projectile = LoadTemplate("+rpg");
}
If(fireModes & 0x4) selector = 3;
Else selector = 1;
rounds = clipsize + 1;
If(GetInv(player, 127) <= 2) rounds = clipsize;
Return;
endI am stumped, I'm hope someone has any suggestions or insight or a solution to this problem I have.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms
Completed
Judgement Day (HLP), My level pack
SATNRT, JK Pistol Mod, Aliens TC, Firearms
Completed
Judgement Day (HLP), My level pack


Well, I'm working through different combinations, and it seems to be crashing on the keys, specifically the mounting and the non-shotgun animations and I can't figure out why. I've even tried it with it defined in static.jkl.
ie JK will only load a set amount of keyframes, and I'm 95% sure its independent of teh number of loadkeyframe()s called.