PDA

View Full Version : 3 round burst...



Lord Kaje
02-04-2005, 01:37 AM
Any examples of how to get the stock StormTrooper rifle to fire a 3 round burst in secondary fire mode...?

_K_

G-Man
02-04-2005, 03:33 AM
look in the weapon cog in JKadvanced

Lord Kaje
02-04-2005, 04:25 AM
Whoah...! I looked -- way too intense for me to figure out...! Thanx for the info though: that's some mean scriptin' I don't quite comprehend, I'll HAVE TO figure out what's going on in that .cog sometime...

How 'bout any other ideas (anybody?)...?

_K_

lucky_jackpot
02-04-2005, 05:03 AM
How about the modification of the character's AI file (PrimaryFire instinct, I believe can control the "burst mode" ;))? I thought that the ST rifle didn't really have 2 modes of fire, so you may be wise to modify the actor's template to include a "weapon" and "weapon2" attribute, so the AI file can distinguish between the two modes...

Just a couple of thoughts - that said it's well too early in the morning for some serious thought, but it at least gives you options to explore...

Hope this info helps :)

-Jackpot

zagibu
02-04-2005, 07:34 AM
Wanna just get the players to be able to fire 3round bursts? No problem, in the fire message of the weap_strifle.cog, add the following lines below the fireprojectile stuff:


// Check if we use primary or secondary fire mode
if(GetSenderRef() == 1)
{
// Wait a third of a second
Sleep(0.3);
// Fire 2nd bolt
// Copy and paste the Fireprojectile line of the original cog onto this line
// Wait a third of a second
Sleep(0.3);
// Fire 3rd bolt
// Copy and paste the Fireprojectile line of the original cog onto this line
}

Replace the two "Copy and paste bla" comments and you are ready to fire three round bursts with secondary fire mode.

Lord Kaje
02-04-2005, 11:53 AM
Damn -- you guys are awesome: thanx...!

_K_

zagibu
02-05-2005, 06:26 AM
Does it work? You know, I didn't test it. I can fix it if it doesn't...I just didn't have any JK resources at hand when I wrote it.

LKOH_SniperWolf
02-05-2005, 01:04 PM
I imagine in such a case, it'd be best to ensuer that the fireWait is 1.0 though. Other wise you could fire overlapping series of 3-round. Nothin big, but just mentioning it.

Lord Kaje
02-05-2005, 01:17 PM
It works...! I used what you gave as a template -- Lo & BeHold, 3 round burst STrifle's a blazin'...! THANX...!

Oh, I don't remember what values I assigned to SetFireWait and/or Sleep: I did, indeed, have to tweak 'em a bit.

Thanx a million -- no -- THANX a BILLION...!

_K_