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 → simple/diverse cogger help
12
simple/diverse cogger help
2002-07-21, 3:33 PM #41
ya I tried that... (as hopefully shown above)

if there isnt anything wrong in that weapon cog it must be something outside it..

------------------
Blue Spandex.
WHEEEEEEEEEE.
2002-07-21, 4:13 PM #42
Everything looks okay in the cog. How are you running this BTW? PC or a level? And are what's the exact problem? One more thing, can you see the hot key in Steup->Controls->Keyboard, way down at the bottem? I know this seem like a lot of questions, but I'm slowing eleminating the possable bugs. [http://forums.massassi.net/html/wink.gif] Also, try checking it with SaberMaster's Parsec or CogWriter 0.3 (at Massassi).

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-07-21, 6:40 PM #43
okay im running it as a test/learning example for a TC so in essence its a PC right now... yes I have the hotkey bound no problem there..... the problem is I hold down fire in game, once I have expelled 30 rounds from my weapon it stops firing like it should, prints the reload message, then I press the key I have bound to reload (R) and nothing happens... no gusta... I ran it thru cogwriter and nothing associated with reload was wrong so im guessing that any possibility of a bug is outside the weapon cog, possibly fire3 cog (which I typed out by hand from your reference) ... but jkstrings.uni and items.dat look in order

Code:
# Jedi Knight Cog Script
#
# FIRE3.COG
#
# Activates 3rd mode for every weapon
#
# thanks to descent pilot - [DP]
# for this cog
#and sabermaster for the rest of the reload process

symbols

thing		player				local

message		activated

end
#==================================================================================

code

activated:
player = GetLocalPlayerThing();
SendMessage(GetInvCog(Player, GetCurWeap(player)), user0);

end


------------------
Blue Spandex.
WHEEEEEEEEEE.

[This message has been edited by sgt_mischa (edited July 22, 2002).]
2002-07-22, 11:42 AM #44
Typed it wrong. Here.
Code:
# Jedi Knight Cog Script
#
# FIRE3.COG
#
# Activates 3rd mode for every weapon
#
# [DP]
#
symbols
thing           player                  local
message         activated
end
                           
# ========================================================================================
code
activated:
player = GetLocalPlayerThing();
SendMessage(GetInvCog(player, GetCurWeapon(player)), user0);
Return;
end
Now, just go into edit (this post) and copy the cog out, and paste in into your cog using wordpad or something. And then there shold be no problems.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.

[This message has been edited by Descent_pilot (edited July 22, 2002).]
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-07-22, 11:56 AM #45
There are a few things wrong with that weapon cog. The randvec variable was never given a value and there's some extraneous code on the line after the FireProjectile() command.

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-07-22, 12:23 PM #46
what value should I assign to randVec?
and this line?:

Code:
 dummy = FireProjectile(player, projectile, fireSound, 8, '0.0100 0.1200 0.00', randVec, 1.0, 0x30, autoAimFOV, autoAimFOV*2);
   (dummy, vectorScale(GetThingVel(dummy), 0.01));
   ChangeInv( player, 11, -1.0 );
   count = count + 1;


what do I need to take out?

------------------
Blue Spandex.
WHEEEEEEEEEE.
2002-07-23, 4:19 AM #47
How did I miss that. *flips through notes* Yes remove that line. The Randvec, you could replace it with '0 0 0' it will fire straight after that, or define it so it fires like the ST rifle.
randVec = VectorSet((Rand()-0.5)*5, (Rand()-0.5)*5, 0.0);

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-07-23, 5:50 AM #48
what part of the line, whole thing? and that WHOLE randvec thing goes in the symbols?

------------------
Blue Spandex.
WHEEEEEEEEEE.
2002-07-23, 6:00 AM #49
This is the line to remove:
Code:
(dummy, vectorScale(GetThingVel(dummy), 0.01));


That RandVec assignment should go right above the FireProjectile() command.

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-07-23, 6:05 AM #50
so do I take it out of symbols?

------------------
Blue Spandex.
WHEEEEEEEEEE.
2002-07-23, 6:31 AM #51
No, unless you want the projectile to fire straight. [http://forums.massassi.net/html/wink.gif]

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-07-23, 6:44 AM #52
I don't know what you've got for RandVec in the symbols, Mischa, but it should be:
Code:
vector  RandVec  local

If you put that assignment code in the symbols, you must take it out or your cog will not run.

------------------
Author of the JK DataMaster, Parsec, and the EditPlus Cog Files.
Visit Saber's Domain.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-07-23, 7:53 AM #53
Okay got the randVec back to normal in symbols, and for the fire line hows this look:
Code:
   if(mode == 0)
   {
   randVec = VectorSet((Rand()-0.5)*5, (Rand()-0.2)*5, 0.0);
   dummy = FireProjectile(player, projectile, fireSound, 8, '0.0100 0.1200 0.00', randVec, 1.0, 0x30, autoAimFOV, autoAimFOV*2);
   ChangeInv( player, 11, -1.0 );
   count = count + 1;
   }
   else
   {
   PlaySoundThing(clicksound, player, 1.0, -1, -1, 0x80);
   }


you said put it before fireprojectile() so there it sits :O

------------------
Blue Spandex.
WHEEEEEEEEEE.
2002-07-23, 11:09 AM #54
That looks fine. Does the cog now fire projectiles in semi-random directions? About the original problem, does your hotkey and reload system now work?

If it doesn't, zip your patch and email it to me. I'll fix whatever errors it still has and send it back to you.

You said you were running your mod with Patch Commander? When making a mod, it's easier to use the -path command. The DataMaster has a tutorial entitled "Setting Up" which explains how to do that. But I digress, let's get your reload system working first. [http://forums.massassi.net/html/smile.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-07-23, 11:24 AM #55
argh it its not working still

/zips up gob
okay emailin it to you saber...

eh oops sorry about my favorite acronym :O
------------------
Blue Spandex.
WHEEEEEEEEEE.

[This message has been edited by SaberMaster (edited July 23, 2002).]

[This message has been edited by sgt_mischa (edited July 23, 2002).]
2002-07-23, 12:39 PM #56
Deliberately bypassing the filter will not endear you to the Massassi staff. Remember that you agreed to the forum rules when you registered to post here. Also, don't leave any of those "acronyms" in your patch.

Anyways, I found your problem. The order of bins in the items.dat is important for hotkeys. Each bin in the items.dat with a flag of 0x100 will be given a hotkey. In the jkstrings.uni, each hotkey is assigned a string of text explaining what it's for. The way JK determines which string is for which hotkey is by the order in which they are listed.

You had your new hotkey right after the weapon bins in the items.dat, but you had the description in the jkstrings at the end of the list. That threw your hotkeys out of line, and so it didn't work. To fix this, put your hotkey bin just before the hotkeyOffset line near the end of the items.dat.

That will fix the problem. [http://forums.massassi.net/html/wink.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-07-23, 4:23 PM #57
*GASP*
IT WORKS OH MY GOSH AHHHHH
Thank you everyone ahhaaha this is great now I understand a whole lot more on adding stuff.... crazy.... bein a newb never felt so good..... right on thx saber/descent

uh oh.. big problem
the second time I started jk everything screwed up..... it unbound all these keys and says it cant bind anymore becuase to many others are attached remove some so I remove as many as I can and it wont stop..

exact error:
Unable to bind control to this action. There are probably too many other controls already attached; try removing some.

and no matter how many controls I remove from the binding menu, the error still pops up!
------------------
Blue Spandex.
WHEEEEEEEEEE.



[This message has been edited by sgt_mischa (edited July 23, 2002).]
2002-07-23, 6:25 PM #58
I ran into this problem with RoX TC. The only thing I can think of that would make it not work is if you didn't update the count in JKStings.uni. *shurgs* I dunno.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2002-07-24, 4:37 AM #59
That's a misleading error message. What it means is that there's something wrong with the bin in the items.dat. Whatever it was you changed before you ran it that second time, change it back.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-07-24, 6:37 AM #60
Aha thank you it works. I even added sounds and stuff but one last question before I let this giant thread go to rest (hehe) descent you were talkin about the "randvec" projectiles, what if they are a little to "random inaccurate" how would I change them without screwing up the gun?

------------------
Blue Spandex.
WHEEEEEEEEEE.
2002-07-24, 11:29 AM #61
So you want to fire less randomly? First, remove all references to the randVec variable. Remove the declaration from the symbols, the assignment in the fire message, and take it out of the FireProjectile() command.

Then, in the vacant parameter of FireProjectile(), add this code:
Code:
VectorScale(RandVec(), 1.2)


You can change the 1.2 to whatever value you need. The higher you make it, the more random. The lower you make it, the less random.

Good luck. [http://forums.massassi.net/html/wink.gif]

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

[This message has been edited by SaberMaster (edited July 24, 2002).]
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2002-07-24, 3:28 PM #62
With LEC version, you can control side to side, and up and down. Where 1 could be more random then the other. SaberMaster's way is good as well.

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
12

↑ Up to the top!