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 → In theory, it should work
In theory, it should work
2002-02-19, 10:19 PM #1
I just had an idea for creating two weapons on one key in JK. I haven't tested it, and I don't have a big enough project going to bother. Here's the idea:

In the items.dat we change, let's say, weap_saber.cog to weap_toggle.cog, then do this in weap_toggle.cog:

Code:
selected:
if(selection = 0)
    {
      SendMessage(user0, weapon_A);
      selection = 1;
      Return;
    }
Else
    {
      SendMessage(user0, weapon_B
      selection = 2;
      Return;
    }


Back in the items.dat, we add two new bins, each flagged as a weapon, with their respective filenames. Like so:

Code:
lightsaber              10              0       1       0x0a4   cog=weap_toggle.cog
lightsaber2              85              0       1       0x0a4   cog=weap_saber.cog
lightstaff              86              0       1       0x0a4   cog=weap_staff.cog


Then, in each weapon's cog, we place User0 right over Selected, like so:

Code:
User0:
selected:
  assign = GetSenderRef();
  jkPrintUNIString(player, 10);


And there you have it!...in theory anyways. If anyone wants to try it out, be my guest.

------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

-Tazz
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

Tazz
2002-02-20, 4:27 PM #2
Wth.. you can't have one message inside another..can you?
Jedi Knight Enhanced
Freelance Illustrator
2002-02-20, 6:37 PM #3
Shred, of course you can! =P

If user0 gets called, it runs through the code. If selected gets called, it runs through the code. Just saves lines of code thats all. [http://forums.massassi.net/html/smile.gif] LEC does it in some of their cogs.

Seems like it would work Tazz, give it a whirl. [http://forums.massassi.net/html/smile.gif]
-Hell Raiser
2002-02-21, 9:19 AM #4
So far, nothing. I probably won't work on it much, but if anyone wants to take my idea and run with it, I'll zip up the .gob and send it to you.

------------------
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

-Tazz
-There are easier things in life than finding a good woman, like nailing Jello to a tree, for instance

Tazz

↑ Up to the top!