Ok, I'm using SavageX's Jeron Fusion Cutter cogs and etc from his Leeza's Destiny Guns (for MP) mod, and I am trying to convert it to JK. (Notice, I have only taken files from the LHGUNS.GOO, not any default MotS stuff) I have been able to convert the pickup cog and it appears to work. The weapon cog is a different story. No matter how much I comment out, it doesn't do anything! Apparantly there's something in the COG that's keeping JK from parsing it, but I can't find anything:
I commented all the stuff out to try to make it work... no luck. Also, I see some stuff I'm gonna have to change in the end (ie the stuff that would make the gun not fire if it got "wet" like in the last two MotS levels), but all I want to do right now is get it to print the debug messages.
NOTE: I used the jkString stuff because Print didn't work... and when jkString didn't work I wss too lazy to change it back!![http://forums.massassi.net/html/biggrin.gif [http://forums.massassi.net/html/biggrin.gif]](http://forums.massassi.net/html/biggrin.gif)
Again: No debug text is printed at all in-game. Cogwriter reports no errors, and when I press the 5 key, nothing happens at all... it doesn't even switch away from the current weapon, a sign that the cog isn't parsing correctly.
I'm sure I HAVE the weapon, because I am using the red5 cheat to ensure I have it.
So, any help for me?
------------------
The Mega-ZZTer's Gaming Haven!
I finally got around to updating my sig... *grumble*...
[This message has been edited by The_Mega_ZZTer (edited June 02, 2003).]
[This message has been edited by The_Mega_ZZTer (edited June 02, 2003).]
Code:
# Jedi Knight Cog Script
#
# WEAP_FUSION.COG
#
# This is the 4 barrel cannon from Dark Forces.
#
# [SavageX]
#
# This Cog is Not supported by LucasArts Entertainment Co.
symbols
model povModel=fusv.3do local
model weaponMesh=fusg.3do local
keyframe mountAnim=fusvmnt.key local
keyframe dismountAnim=fusvdis.key local
keyframe povfireAnim=fusvpst1.key local
keyframe holsterAnim=kyhlstr.key local
sound mountSound=df_bry_ready.wav local
sound dismountSound=PutWeaponAway01.wav local
sound fireSound=fusionfire.wav local
sound failSound=weapfail.wav local
sound outSound=fusionout.wav local
material fusionmat=fusion.mat local
template projectile=+fusionbolt local
template projectileB=+swsparks local
thing player local
flex fireWait1=0.25 local
flex holsterWait local
flex powerBoost local
flex autoAimFOV=30 local
flex autoAimMaxDist=5 local
int trackID=-1 local
int dummy=0 local
int mode local
int holsterTrack local
int nextfire=0 local
message startup
message activated
message deactivated
message selected
message deselected
message autoselect
message fire
message timer
end
# ========================================================================================
code
startup:
// MaterialAnim(fusionmat, 8, 1);
return;
# ........................................................................................
fire:
// player = GetSourceRef();
//
// // Check that the player is still alive.
// if(GetThingHealth(player) <= 0) Return;
//
// // Check Ammo - If we are out, autoselect best weapon.
// if(GetInv(player, 12) < 1.0)
// {
// PlaySoundThing(outSound, player, 1.0, -1.0, -1.0, 0x80);
// if(GetAutoSwitch() & 1) SelectWeapon(player, AutoSelectWeapon(player, 1));
// Return;
// }
//
// //SendMessageEx(GetThingClassCog(GetLocalPlayerThing()), user1, 3.0, 0, 0, 0);
//
// if(mode == 0)
// {
// SetPOVShake('0.0 -.003 0.0', '1.0 0.0 0.0', .05, 80.0);
// if(nextfire == 0)
// {
// if(GetInv(player, 93) > 0.0) dummy = FireProjectile(player, projectileB, failSound, 8, '-0.0135 0.1 0.0', '0 0 0', 1.0, 0x20, autoAimFOV, autoAimFOV*2);
// else if(IsMulti())
// {
// SendTrigger(-1, GetCurWeapon(player)*100, player, mode, 1, 0);
// playsoundthing(firesound, player, 1.0, -1, -1, 0x80);
// playmode(player, 8);
// }
// else dummy = FireProjectile(player, projectile, fireSound, 8, '-0.0135 0.1 0.0', '0 0 0', 1.0, 0x20, autoAimFOV, autoAimFOV*2);
// nextfire = 1;
// }
// else
// if(nextfire == 1)
// {
// if(GetInv(player, 93) > 0.0) dummy = FireProjectile(player, projectileB, failSound, 8, '-0.0035 0.1 -0.005', '0 0 0', 1.0, 0x20, autoAimFOV, autoAimFOV*2);
// else if(IsMulti())
// {
// SendTrigger(-1, GetCurWeapon(player)*100, player, mode, 2, 0);
// playsoundthing(firesound, player, 1.0, -1, -1, 0x80);
// playmode(player, 8);
// }
// else dummy = FireProjectile(player, projectile, fireSound, 8, '-0.0035 0.1 -0.005', '0 0 0', 1.0, 0x20, autoAimFOV, autoAimFOV*2);
// nextfire = 2;
// }
// else
// if(nextfire == 2)
// {
// if(GetInv(player, 93) > 0.0) dummy = FireProjectile(player, projectileB, failSound, 8, '0.0135 0.1 -0.01', '0 0 0', 1.0, 0x20, autoAimFOV, autoAimFOV*2);
// else if(IsMulti())
// {
// SendTrigger(-1, GetCurWeapon(player)*100, player, mode, 3, 0);
// playsoundthing(firesound, player, 1.0, -1, -1, 0x80);
// playmode(player, 8);
// }
// else dummy = FireProjectile(player, projectile, fireSound, 8, '0.0135 0.1 -0.01', '0 0 0', 1.0, 0x20, autoAimFOV, autoAimFOV*2);
// nextfire = 3;
// }
// else
// if(nextfire == 3)
// {
// if(GetInv(player, 93) > 0.0) dummy = FireProjectile(player, projectileB, failSound, 8, '0.0235 0.1 -0.015', '0 0 0', 1.0, 0x20, autoAimFOV, autoAimFOV*2);
// else if(IsMulti())
// {
// SendTrigger(-1, GetCurWeapon(player)*100, player, mode, 0, 0);
// playsoundthing(firesound, player, 1.0, -1, -1, 0x80);
// playmode(player, 8);
// }
// else dummy = FireProjectile(player, projectile, fireSound, 8, '0.0235 0.1 -0.015', '0 0 0', 1.0, 0x20, autoAimFOV, autoAimFOV*2);
// nextfire = 0;
// }
// jkPlayPOVKey(player, povfireAnim, 1, 0x38);
// ChangeInv(player, 12, -1.0);
// }
// else
// if(mode == 1)
// {
// if(GetInv(player, 12) < 4) PlaySoundThing(outSound, player, 1.0, -1.0, -1.0, 0x80);
// else
// {
// SetPOVShake('0.0 -.003 0.0', '1.0 0.0 0.0', .05, 80.0);
// if(GetInv(player, 93) > 0.0)
// {
// dummy = FireProjectile(player, projectileB, failSound, 8, '-0.0135 0.1 0.0', '0 5 0', 1.0, 0x20, -1, -1);
// dummy = FireProjectile(player, projectileB, -1, -1, '-0.0035 0.1 -0.005', '0 2.5 0', 1.0, 0x20, -1, -1);
// dummy = FireProjectile(player, projectileB, -1, -1, '0.0135 0.1 -0.01', '0 -2.5 0', 1.0, 0x20, -1, -1);
// dummy = FireProjectile(player, projectileB, -1, -1, '0.0235 0.1 -0.015', '0 -5 0', 1.0, 0x20, -1, -1);
// }
// else
// if(IsMulti())
// {
// SendTrigger(-1, GetCurWeapon(player)*100, player, mode, 0, 0);
// playsoundthing(firesound, player, 1.0, -1, -1, 0x80);
// playmode(player, 8);
// }
// else
// {
// dummy = FireProjectile(player, projectile, fireSound, 8, '-0.0135 0.1 0.0', '0 5 0', 1.0, 0x20, -1, -1);
// dummy = FireProjectile(player, projectile, -1, -1, '-0.0035 0.1 -0.005', '0 2.5 0', 1.0, 0x20, -1, -1);
// dummy = FireProjectile(player, projectile, -1, -1, '0.0135 0.1 -0.01', '0 -2.5 0', 1.0, 0x20, -1, -1);
// dummy = FireProjectile(player, projectile, -1, -1, '0.0235 0.1 -0.015', '0 -5 0', 1.0, 0x20, -1, -1);
// }
// jkPlayPOVKey(player, povfireAnim, 1, 0x38);
// ChangeInv(player, 12, -4.0);
// }
// }
// powerBoost = GetInv(player, 63);
// ChangeFireRate(player, fireWait1*(mode+1)/powerBoost);
Return;
# ........................................................................................
activated:
jkStringClear();
jkStringConcatAsciiString("Activated");
jkStringOutput(player, -1);
// player = GetSourceRef();
// mode = GetSenderRef();
// jkSetWaggle(player, '0.0 0.0 0.0', 0);
// //if (GetInv(player, 93) > 0.0) SendMessageEx(GetThingClassCog(player), skill, 1100, 0, 0, 0);
// powerBoost = GetInv(player, 63);
// ActivateWeapon( player, fireWait1*(mode+1)/powerBoost, mode );
Return;
# ........................................................................................
deactivated:
jkStringClear();
jkStringConcatAsciiString("Deactivated");
jkStringOutput(player, -1);
// player = GetSourceRef();
// mode = GetSenderRef();
// jkSetWaggle(player, '10.0 7.0 0.0', 350);
// DeactivateWeapon( player, mode );
Return;
# ........................................................................................
selected:
jkStringClear();
jkStringConcatAsciiString("Selected");
jkStringOutput(player, -1);
// player = GetSourceRef();
//
// // Setup the meshes and models.
// jkSetPOVModel(player, povModel);
// jkSetWeaponMesh(player, weaponMesh);
// SetArmedMode(player, 1);
//
// // Play mounting sound.
// //PlayMode(player, 41);
// 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 = jkPlayPOVKey(player, mountAnim, 0, 0x14);
// jkSetWaggle(player, '10.0 7.0 0.0', 350);
//
// // Clear saber flags, and allow activation of the weapon
// jkClearFlags(player, 0x5);
// SetCurWeapon(player, bin);
// SetMountWait(player, GetKeyLen(mountAnim));
//
// if(GetInv(player, ammobin) < 1.0)
// {
// PlaySoundThing(outSound, player, 1.0, -1, -1, 0x80);
// if(GetAutoSwitch() & 1)
// SelectWeapon(player, AutoSelectWeapon(player, 1));
// }
Return;
# ........................................................................................
deselected:
jkStringClear();
jkStringConcatAsciiString("Deselected");
jkStringOutput(player, -1);
// player = GetSourceRef();
//
// PlaySoundThing(dismountSound, player, 1.0, -1, -1, 0x80);
// jkPlayPOVKey(player, dismountAnim, 0, 0x18);
//
// 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:
// player = GetSourceRef();
//
// // If the player has the weapon
// if(GetInv(player, bin) > 0.0)
// {
// // If the player has ammo
// if(GetInv(player, ammobin) > 0.0)
// {
// ReturnEx(700.0);
// }
// else
// {
// ReturnEx(-1.0);
// }
// }
// else
// {
// ReturnEx(-1.0);
// }
Return;
# ........................................................................................
timer:
// StopKey(player, holsterTrack, 0.0);
Return;
endI commented all the stuff out to try to make it work... no luck. Also, I see some stuff I'm gonna have to change in the end (ie the stuff that would make the gun not fire if it got "wet" like in the last two MotS levels), but all I want to do right now is get it to print the debug messages.
NOTE: I used the jkString stuff because Print didn't work... and when jkString didn't work I wss too lazy to change it back!
![http://forums.massassi.net/html/biggrin.gif [http://forums.massassi.net/html/biggrin.gif]](http://forums.massassi.net/html/biggrin.gif)
Again: No debug text is printed at all in-game. Cogwriter reports no errors, and when I press the 5 key, nothing happens at all... it doesn't even switch away from the current weapon, a sign that the cog isn't parsing correctly.
I'm sure I HAVE the weapon, because I am using the red5 cheat to ensure I have it.
So, any help for me?
------------------
The Mega-ZZTer's Gaming Haven!
I finally got around to updating my sig... *grumble*...
[This message has been edited by The_Mega_ZZTer (edited June 02, 2003).]
[This message has been edited by The_Mega_ZZTer (edited June 02, 2003).]
![http://forums.massassi.net/html/tongue.gif [http://forums.massassi.net/html/tongue.gif]](http://forums.massassi.net/html/tongue.gif)
![http://forums.massassi.net/html/rolleyes.gif [http://forums.massassi.net/html/rolleyes.gif]](http://forums.massassi.net/html/rolleyes.gif)
![http://forums.massassi.net/html/smile.gif [http://forums.massassi.net/html/smile.gif]](http://forums.massassi.net/html/smile.gif)
![http://forums.massassi.net/html/frown.gif [http://forums.massassi.net/html/frown.gif]](http://forums.massassi.net/html/frown.gif)