Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → need help saber+sword?
need help saber+sword?
2007-03-07, 11:15 PM #1
I've been downloading saber packs and using gobex to put them all into Jedi Knight.
But then I came across swords.... so I've been unsuccesfully trying to edit the right cog to define when a sword's mat is in use so that I could change the 3dos.
I don't know much at all about cog but I'm trying to learn.
Is what I'm trying to do possible?:confused:
The Earth will never give up all its secrets, because we will never accept them all.
2007-03-08, 8:37 AM #2
I think all you really need to do is, open the saber's 3dos and edit them followed by some twitching of weap_saber.cog

Saber 3dos come in 3:
one for the internal view,
one for the external view (what people see he holds)
one for dropitem (like a weapon you pick up)

So once you have those 3 3dos ready to go for your sword, you really don't need saber mats. Just have the weapon activate like a normal one (with loading the 3dos instead of a mat surface).

I believe the JK engine will create an invisible-surface with jkEnableSaber(), and that is what causes lightsabers to clash. Otherwise you will just be waving a 3do around without any damage.

The parameters for jkEnableSaber() include:
-how long that invisible surface is (length of the saber to the tip)
-the mats for the saber (which for you should be -1)
-the widths of the mats (yea you can change the tip size and saber size, but these should be -1 for you also).

The light created by a lightsaber I think is controlled by the engine-created-invisible surface. You should get the JK datamaster and it will explain cog verbs and flags to you.
This is retarded, and I mean drooling at the mouth
2007-03-08, 2:27 PM #3
I need some saber help too. Ive got a cog that uses SetInv(player, 10, 0); to take away the player's lightsaber, and the blade retracts, but it still makes the humming sound. How do I stop that? I dont want it to switch weapons, just stop humming and also play the saber's off sound.
Baby dragons can't figure out humans- If they didn't want to be eaten, why were they made of meat and treasure?
2007-03-08, 3:42 PM #4
Twitch, is this a startup cog, or something that happens in the middle of the level? Either way, I think what you need to add to your cog is jkDisableSaber() or something like that.
2007-03-08, 5:49 PM #5
Sorry, my previous post refers to the jkSetSaberInfo() COG verb instead of jkEnableSaber()

Here is a link to JK Datamaster. It is a compilation of everything we know about COG verbs and Flags (like 0x8) with common sense descriptions.

http://www.jkhub.net/manual/index.php?manual=2

I actually have a sword cog, but it is for one of my unfinished mods and it contains a lot of extra 'junk' so I won't post it cause it will confuse you.

You can post your cogs here so we can look at them and debug it.

TWITCH:
If your cog is a level cog, try setting the players weapon to fists automatically. THEN, SetInv(player, 10, 0); will take away the player's saber permanently until he gets a new one. Changing the player's weapon first will force the game to go through the lightsabers's cog for DEACTIVATION which includes the stopping of the hum.

If your cog is for a custom saber cog itself you are working on, read on:
I'm almost certain Kievan Mereel is right. You need something like
jkDisableSaber(player);
In your deselected: message somewhere
This is retarded, and I mean drooling at the mouth
2007-03-09, 1:20 AM #6
Hmmmm. There seems a lot more I've got to learn than I first thought!:eek:

I'm not at home at the moment so I can't try anything, (I'm staying at someone elses house, one of my older brothers, and won't be back home until tuesday.) but I do have some questions/queries.

About those 3do's, is internal first person? and external 3rd person?
And what is the difference exactly, do I have to make them differently?
(if so is there a tutorial you can direct me to.)

About what I was trying to do, I think I may not have explained it very well.
I was trying to set up the saber selection so that I could choose a saber or a sword.

Thanks for the link to JK Datamaster it should be a great help!:)
The Earth will never give up all its secrets, because we will never accept them all.
2007-03-09, 8:17 AM #7
"I was trying to set up the saber selection so that I could choose a saber or a sword."

Heh; I thought so. Currently, cog does not have a way to check what saber the player chooses from the saber selection screen. For what you want, you would have to change one line of the saber mats listed in the misc/sabers.dat file to correspond to your sword mats. The stuff about 3dos that people have posted is not related to the saber selection screen.

Internal view = 1st person view (sometimes called pov view)
External view = 3rd person view

The internal view does not show the player model, so the weapon model shown is different than the weapon model shown in external view.

Download the JK Editing Manual, which contains all of the tutorials found on Massassi.net. Look in there for saber edits you can do.

:)

↑ Up to the top!