lfnetwork.com mark read register faq members calendar

Thread: [code] Four-Barreled Weapon
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 06-23-2003, 11:53 PM   #1
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
[code] Four-Barreled Weapon

My latest dilemma in this series involves the following weapon (fusion cutter from Dark Forces, unskinned)...

As you can see, I've labeled the four barrels to show where the projectiles are supposed to be fired from...



Is is possible to have separate fire origins? I was planning on seeing if our weapon modeler could create four "tag_flash" tags named "tag_flash", "tag_flash1", "tag_flash2", and "tag_flash3" and alternate them in CG_AddPlayerWeapon(), but I wasn't sure if that was the right way to go. Any ideas?

For primary fire, we want to have it fire sequentially 1,2,3,4,1... and on alt-fire do all four at once (don't know if that's doable however).

If anyone has already done something like this and would like to share some of their insights I'd appreciate it. Otherwise I'll keep plugging away at it...

Thanks!



recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 06-24-2003, 02:16 AM   #2
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,187
Sure it's possible but you'd have to do some code changes to make it work.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 06-24-2003, 03:20 AM   #3
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
Quote:
Sure it's possible
well, that helps a bit.

Quote:
but you'd have to do some code changes to make it work.
i'm not worried about that so much (that's why i prefixed the thread name with "[code]")... i was hoping to bounce the idea of some of the more experienced coders to see if my methodology was a) not the best way to do it, b) overly complex and there was actually some simpler way of accomplishing it, and i'm going in the wrong direction.

but if the method of attack seems reasonable to you and others then I'm willing to trust your judgment.

thanks!


recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 06-24-2003, 08:23 PM   #4
Code
 
Code's Avatar
 
Join Date: Nov 2002
Posts: 103
my 2 cents (did this for the atst)
just play around with the muzzle point, and it did the job for me

the way i 'figured' this was looking at the bryar fire code (server)
try ther


Regards
Code aka DLF[ELDER]_Code_Wiz
Code is offline   you may: quote & reply,
Old 06-24-2003, 08:29 PM   #5
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
Interesting.. in earlier tests, when I played around with the muzzle, it made the crosshairs shift erratically.

But I'm totally willing to take another look at it.

Thanks!



recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 06-24-2003, 10:01 PM   #6
Code
 
Code's Avatar
 
Join Date: Nov 2002
Posts: 103
sorry was lazy, i ment the blaster code
so that u can forgive me
here is a straith paste of what i mean

PHP Code:
//static void WP_FireBlaster( gentity_t *ent, qboolean altFire )
static void WP_FireBlastergentity_t *entqboolean altFireqboolean isAtst)
//---------------------------------------------------------
{
    
vec3_t    dirangsnewMuzzle;

//NOTETOSELF : probably npc use this , as an atst

    
vectoanglesforwardangs );

    if ( 
altFire )
    {
// add some slop to the alt-fire direction
        
angs[PITCH] += crandom() * BLASTER_SPREAD;
        
angs[YAW]    += crandom() * BLASTER_SPREAD;
    }

    
AngleVectorsangsdirNULLNULL );

    
// FIXME: if temp_org does not have clear trace to inside the bbox, don't shoot!

    
if ( isAtst )
    {
        
newMuzzle[0] = muzzle[0] - atst_muzzleone.value;
        
newMuzzle[1] = muzzle[1] - atst_muzzletwo.value;
        
newMuzzle[2] = muzzle[2] + atst_muzzletre.value;

        if (
altFire)
        {
            
newMuzzle[0] += atst_muzzlefor.value;
            
newMuzzle[1] -= atst_muzzlefiv.value;
        }

        
WP_FireBlasterMissileentnewMuzzlediraltFire );
    }
    else
    {
        
WP_FireBlasterMissileentmuzzlediraltFire );
    }

    if ( 
isAtst )
    {
//fire the 'second' one also
        
if (!altFire)
        {
            
newMuzzle[1] += atst_muzzlesix.value;
        }
        
WP_FBlasterAgain(entaltFirenewMuzzle);
        if (
altFire)
        {
//3rd and 4th !
            
WP_FBlasterAgain(entaltFirenewMuzzle);
            
WP_FBlasterAgain(entaltFirenewMuzzle);
        }
    }
}
//endatstcode 


Regards
Code aka DLF[ELDER]_Code_Wiz
Code is offline   you may: quote & reply,
Old 06-25-2003, 05:17 AM   #7
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,187
Well, the real question is how indepth of a change do you want?


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 06-25-2003, 04:17 PM   #8
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
...well, if it's going to have to be really in-depth fix, then I'll have to go for it.

I'm going to try out the multiple tag method first and see how that goes (since our modeler already put them in the model).

I'll keep you posted on my progress.



recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 06-25-2003, 05:10 PM   #9
Azymn
 
Azymn's Avatar
 
Join Date: Jul 2002
Location: ~(40.14, -111.40)
Posts: 544
You'll need the multiple tag_flash#'s clientside for rendering the muzzle "powder flash" on firing, and then you'll have to create 4 vec3_t muzzle points (see the vec3_t array Code referenced above) as offsets from the player origin to determine where the 'bullet' originates serverside.

You have the right idea.

Azymn is offline   you may: quote & reply,
Old 06-26-2003, 04:44 AM   #10
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
thanks, Azymn. I'll try out your suggestions....

...of course it doesn't mean I won't ask you more questions later, but I'll give it a shot.



recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 06-26-2003, 06:05 AM   #11
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,187
Yeah, Azymn stated what I was getting at. At the minimum, you'll need to change the clientside to make the muzzle flash work correctly.

You can also play with some stuff server depending on how close you want the bolt orientation to the actual muzzle, but it's not really that critical. Raven did really simple system based off the viewpoint or something like that. I made MotF be based off the actual ghoul2 model but that's 1) complicated and 2) screws up the crosshair alignment.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 06-26-2003, 06:10 AM   #12
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
something's not right here. i must be making my modifications in the wrong location (btw, this only refers to the "tag_flash" issue - I haven't gotten back to the muzzle stuff...).

During one click of the mouse button, my debug statement in cg_weapons.c, CG_AddPlayerWeapon output the following (written out to the console):

Code:
iFusionBarrel: 0
iFusionBarrel: 1
iFusionBarrel: 2
iFusionBarrel: 3
iFusionBarrel: 0
iFusionBarrel: 1
iFusionBarrel: 2
iFusionBarrel: 3
iFusionBarrel: 0
based on the value of iFusionBarrel, it decides which tag_flash to use:

Code:
CG_Printf("iFusionBarrel: %i\n", iFusionBarrel); // jodfmod debug
if (iFusionBarrel == 0) 
{
  CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash");
}
else if (iFusionBarrel == 1) 
{
  CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash1");
}
else if (iFusionBarrel == 2) 
{
  CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash2");
}
else if (iFusionBarrel == 3) 
{
  CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash3");
}
    
iFusionBarrel++;
if (iFusionBarrel == 4)
{
  iFusionBarrel = 0;
}
So obviously that must be the wrong place to put it, or have the firing logic to the incrementing... because this seems to just increment over and over. thus creating a random (practically) selection of the tag_flash...

This was a similar problem I was having in CG_CalcMuzzlePoint.

Hmmm...


recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 06-26-2003, 07:33 AM   #13
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,187
Well, is iFusionBarrel a global varible?


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 06-26-2003, 01:37 PM   #14
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
Quote:
Originally posted by razorace
Well, is iFusionBarrel a global varible?
...not currently.

Basically, I was using it locally within CG_AddPlayerWeapon(), but I'm beginning to see that I've been narrowing my scope too much.

So I'm thinking I should probably make iFusionBarrel global, and increment it when firing instead. Then in CG_AddPlayerWeapon() use the appropriate tag_flash. Sound reasonable?

...then on to the muzzle issue.


recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 06-26-2003, 04:02 PM   #15
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
update: success part one.

OK. Looks like that was the right way to go. Funny. Just this morning before I read your post I was mulling all this over (as I often do when getting ready for work...) and it occurred to me that I needed to have the separation - i.e. increment it in the firing function.

...then razor asked the above question which confirmed my suspicions.

So now I have a g_iFusionBarrel global that maintains the current flash "index" and it gets incremented in CG_FireWeapon(). It seems to be working correctly now.

Now I have to deal with the projectile issue.



recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 06-26-2003, 04:30 PM   #16
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,187
Well, remember if you're using a single varible, that will mean that other players' firing will effect the counter.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 06-26-2003, 05:35 PM   #17
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
OK... good point.

So I added a component to the centity_s struct and now in CG_AddPlayerWeapon I do the following:

Code:
CG_Printf("cent->fusionBarrelIndex: %i\n", cent->fusionBarrelIndex); // jodfmod debug
if (cent->fusionBarrelIndex == 0) 
{
  CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash");
}
else if (cent->fusionBarrelIndex == 1) 
{
  CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash1");
}
else if (cent->fusionBarrelIndex == 2) 
{
  CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash2");
}
else if (cent->fusionBarrelIndex == 3) 
{
  CG_PositionEntityOnTag( &flash, &gun, gun.hModel, "tag_flash3");
}
...and increment it in CG_FireWeapon() like so:

Code:
// lightning gun only does this this on initial press
if ( ent->weapon == WP_FUSION_CUTTER ) {

  //---------------------------------------------------------
  // jodfmod - increment barrel index for the current entity
  //---------------------------------------------------------
  cent->fusionBarrelIndex++; 
  if (cent->fusionBarrelIndex == 4)
  {
    cent->fusionBarrelIndex = 0;
  }
  //---------------------------------------------------------
  
  if ( cent->pe.lightningFiring ) {
    return;
  }
}
So hopefully that will work OK...


recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 06-27-2003, 04:45 PM   #18
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
Post mission pt.1 accomplished...

Well, I was able to get the four-barreled weapon firing working last night!

At first, I was somewhat dubious about my edits, but it worked just like I wanted it to!

Thanks for the help, gentlemen (with special shouts going out to Azymn)!!!



recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 06-27-2003, 04:54 PM   #19
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
now on to part two, which is the alt-fire, in which four projectiles need to be shot out at once.

It was intimated to me that this would probably be the easier of the two cases, but we shall see...



recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 06-27-2003, 04:58 PM   #20
Wudan
Got Balance?
 
Wudan's Avatar
 
Join Date: Oct 2002
Location: Salt Lake, UT
Posts: 1,442
Indeed, I think it shall prove to be the easier of the two.


Mt-Wudan.com
I made a silly little program called Dragon, which is an animation tool for the GLA format, used in Jedi Outcast, Jedi Academy and Krakatoa.
Wudan is offline   you may: quote & reply,
Old 06-27-2003, 06:14 PM   #21
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,187
Yep, just check out how the server handles the creation of alt-fire effects/missiles and simply create 4 bolts with a simple vertical offset (based on your oientation if you're picky).


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 06-27-2003, 06:19 PM   #22
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
Quote:
Originally posted by razorace
Yep, just check out how the server handles the creation of alt-fire effects/missiles and simply create 4 bolts with a simple vertical offset (based on your oientation if you're picky).
good suggestion, razor.

thanks!



recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 06-27-2003, 06:22 PM   #23
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
...and just found something I can use! A fellow teammate already did a similar thing with the repeater...

it won't be long now!



recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 06-28-2003, 03:53 PM   #24
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
vector math woes

Looks like I've almost got it going, but there's something up with my vector math...

stupidly, I just added/subtracted offset values from the second element a temporary muzzle entity I create in the routine, mistakenly thinking that this would do what I want.

The funny thing is that if I'm turned one way, it looks like I"m shooting one big projectile (since from that perspective they're all stacked one on top of another), and if I turn 90 degrees I get four projectiles horizontally - basically what I wanted.

So obviously it's offsetting the muzzle on one axis only in threespace (duh).

My next question is...

How can I come up with the appropriate offsets that will always be perpendicular to the player's view, thus creating four projectiles in a row horizontally that shoot forward?

Here's a diagram of what I'm trying to accomplish (the black dashed arrow is the muzzle vector, and the red arrows are the desired vectors offset from the muzzle):



(I've always had a problem with vectors in math... grrrrr...)

Thanks!



recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org

Last edited by recombinant; 06-28-2003 at 05:07 PM.
recombinant is offline   you may: quote & reply,
Old 06-28-2003, 06:57 PM   #25
Azymn
 
Azymn's Avatar
 
Join Date: Jul 2002
Location: ~(40.14, -111.40)
Posts: 544
Since i'm bored-crazy right now, and you've got most of it done...

static void ShootFourShots( gentity_t *ent )
{
gentity_t *missile1;
gentity_t *missile2;
gentity_t *missile3;
gentity_t *missile4;

vec3_t tmpMuzzle, newMuzzle;

VectorCopy(fusionMuzzle[0], tmpMuzzle);
VectorCopy(ent->s.pos.trBase, newMuzzle);

VectorMA(newMuzzle, tmpMuzzle[0], forward, newMuzzle);
VectorMA(newMuzzle, tmpMuzzle[1], right, newMuzzle);
newMuzzle[2] += ent->client->ps.viewheight + tmpMuzzle[2];

SnapVector( newMuzzle );

missile1 = CreateMissile( newMuzzle, forward, FUSION_CUTTER_VELOCITY, 10000, ent, qfalse);

...rinse, repeat as necessary....


Azymn is offline   you may: quote & reply,
Old 06-28-2003, 08:27 PM   #26
Wudan
Got Balance?
 
Wudan's Avatar
 
Join Date: Oct 2002
Location: Salt Lake, UT
Posts: 1,442
BooYah! Azymn with the wicked math tricks!


Mt-Wudan.com
I made a silly little program called Dragon, which is an animation tool for the GLA format, used in Jedi Outcast, Jedi Academy and Krakatoa.
Wudan is offline   you may: quote & reply,
Old 06-29-2003, 02:29 AM   #27
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
BooYahh is right!!!



Many thanks again to the master!!!



But I'd really like to know *why* it works - what the concept is behind the functions. I'm happy to copy and paste the code, but I really need to understand what's going on here! Ack!


recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 06-29-2003, 04:51 AM   #28
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,187
Code:
static void ShootFourShots( gentity_t *ent )
{

//racc - create missile entities    
        gentity_t *missile1;
        gentity_t *missile2;
        gentity_t *missile3;
        gentity_t *missile4;

//racc - initialize origin point vectors
//tmpMzzle = muzzle point in x/y orientation from the player (doesn't worry about the z axis)
//newMuzzle = working muzzle origin vector.  This is where your
//desired muzzle point vector will be at the end of the calculations.
        vec3_t  tmpMuzzle, newMuzzle;

        VectorCopy(fusionMuzzle[0], tmpMuzzle);
        VectorCopy(ent->s.pos.trBase, newMuzzle);

//racc - Translate the x factor of the fusionMuzzle into the current
//muzzle position by using the forward/right vectors determined 
//earlier.
        VectorMA(newMuzzle, tmpMuzzle[0], forward, newMuzzle);

//racc - Translate the y factor with the same method.
        VectorMA(newMuzzle, tmpMuzzle[1], right, newMuzzle);

//racc - Bump up the muzzle point so it's in terms of the viewpoint inside of the player origin.
        newMuzzle[2] += ent->client->ps.viewheight + tmpMuzzle[2];

//racc - Convert the data to integers to make it easier on the network connection.
        SnapVector( newMuzzle );

//racc - Configure missile1 with the newly calculated muzzle point.
        missile1 = CreateMissile( newMuzzle, forward, FUSION_CUTTER_VELOCITY, 10000, ent, qfalse);


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 06-29-2003, 05:53 PM   #29
Fracman
 
Fracman's Avatar
 
Join Date: Jan 2003
Location: Germany
Posts: 501
To be perfect, you'd have to adjust the firing sequences to the inclination of the weapon, since it is lower on the right side of your screenshot.
And it seems the two left and the two right projectiles are closer to each other, leaving a gap between the middle two.
But its not that important.
Cool its working!!!


Dark Forces MOD for Jedi Knight: Jedi Academy
http://darkforces.jediknight.net

DFMOD Demo for JA released !!!
Fracman is offline   you may: quote & reply,
Old 06-29-2003, 10:31 PM   #30
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
Thanks for the inline comments, razorace - they help immensely...

Fracman - yes it's not perfect, but I'm really happy with the results so far, and I still have some tweaking to do with it anyway.

Thanks for all the great help, guys!! YOU ROCK!!!



recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 06-30-2003, 12:46 AM   #31
ImmolatedYoda
 
ImmolatedYoda's Avatar
 
Join Date: May 2002
Location: My closet, Georgia
Posts: 612
man, i cant wait to plug some stormies with some secondary fusion cutter action.... good work recombinant and everyone else, youre helping a better cause!


Okay, for brevity's sake:

Personal Computers > Consoles.
ImmolatedYoda is offline   you may: quote & reply,
Old 06-30-2003, 04:37 AM   #32
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,187
Quote:
Originally posted by recombinant
Thanks for the inline comments, razorace - they help immensely...Thanks for all the great help, guys!! YOU ROCK!!!

You're welcome.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 07-03-2003, 05:20 PM   #33
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
After a little tweaking...

Quote:
Originally posted by Fracman
To be perfect, you'd have to adjust the firing sequences to the inclination of the weapon, since it is lower on the right side of your screenshot.
And it seems the two left and the two right projectiles are closer to each other, leaving a gap between the middle two.
After playing around with the code for a bit I think I've got it looking much better:





There's still an issue with the sequencing on the primary fire that Salv pointed out to me privately, but that shouldn't be too difficult to fix.



recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 07-03-2003, 06:29 PM   #34
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
...as predicted, the fix for the sequencing was trivial.

whew!



recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Old 07-03-2003, 07:56 PM   #35
Fracman
 
Fracman's Avatar
 
Join Date: Jan 2003
Location: Germany
Posts: 501
Everything is trivial... after you know how to do

Nice work, Code-Recombinant!


Dark Forces MOD for Jedi Knight: Jedi Academy
http://darkforces.jediknight.net

DFMOD Demo for JA released !!!
Fracman is offline   you may: quote & reply,
Old 07-04-2003, 02:40 AM   #36
RoxStar
Moderator
 
RoxStar's Avatar
 
Join Date: Jun 2003
Location: Chicago
Posts: 3,412
Current Game: Everything Zelda
10 year veteran! Forum Veteran LFN Staff Member 
Man, If I could do half of the stuff you guys are doing...

RoxStar is offline   you may: quote & reply,
Old 07-24-2003, 09:31 PM   #37
SepTa
Lurker
 
SepTa's Avatar
 
Join Date: Jul 2003
Location: .......
Posts: 2
If you could do half of it.... hmmm...... that brings up a good point. How do you do half this stuff.

Ok, let me reitterate. I've scoured the base pk3s, searched them up and down. I still havent found the files that control the weaponry. Furthermore, I've only ever seen lightsaber mods, and not very good ones at that. I've yet to find a mod that actually edits the gun's projectiles. Reskins and new models all over the place, with some quickened fire rates, dubbed as weapon mods. But none of the projectiles have changed. But looking at the FC here... It appears you guys have pulled it off.to my knowledge, you guys are the only people to actually successfully turn one weapon into another.

My question is: What files controll the weapon actions? sounds?what controls the projectiles? I might be able to pull off making some very unique guns, I'm good at figuring out code. But I need to know file names and directories first. Any help here?
SepTa is offline   you may: quote & reply,
Old 07-24-2003, 10:40 PM   #38
Commodus
 
Commodus's Avatar
 
Join Date: Apr 2002
Posts: 216
The source. Download the second set of editing tools and you will get the source code for the game, cgame and ui modules of JK2 (in C code).

When the .c files are compiled they make .qvm files (which are located in the vm directory in the .pk3s).
Commodus is offline   you may: quote & reply,
Old 07-25-2003, 06:55 AM   #39
Fracman
 
Fracman's Avatar
 
Join Date: Jan 2003
Location: Germany
Posts: 501
The source has those weapon related files:
bg_weapons.h (defines to enable each weapons and ammo separately)
bg_weapons.c (properties of each weapon, e.g. ammo, damage)
cg_weaponinit.c (initialize weapon structures and assign models & sounds)
cg_weapon.c (insert weapons in game)
fx_xxx.c (weapon effects)
g_weapon.c (firing weapons, primary and secondary fire)


Dark Forces MOD for Jedi Knight: Jedi Academy
http://darkforces.jediknight.net

DFMOD Demo for JA released !!!
Fracman is offline   you may: quote & reply,
Old 07-25-2003, 08:27 PM   #40
recombinant
 
recombinant's Avatar
 
Join Date: May 2002
Location: petaluma, ca, usa
Posts: 346
Quote:
Originally posted by Commodus
The source. Download the second set of editing tools and you will get the source code for the game, cgame and ui modules of JK2 (in C code).

When the .c files are compiled they make .qvm files (which are located in the vm directory in the .pk3s).
...succinctly put. well done!



recombinant | lead programmer
---------------------------------------------
Dark Forces Mod for Jedi Academy
http://darkforces.jediknight.net
#dfmod @ irc.gamesurge.net
#jkacoding @ irc.quakenet.org
recombinant is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > General Editing > [code] Four-Barreled Weapon

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:09 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.