PDA

View Full Version : Altering Weapon Physics....


Business_Eskimo
07-02-2003, 10:25 PM
I was wondering if there was a fairly easy way to alter the physics of a grenade (thermal detonator, i guess its called) in JK2 so that takes longer to explode and how much it bounces. If this type of question has been answered before, I am sorry. I have looked around many sites, and found nothing even remotely close to this.

Thanks.

Code
07-03-2003, 04:50 AM
im asuming u have the code base (sdk)

1: go in gamedata/code/game/

2: find g_weapon.c

3: open it with notepad (or your compiler)

4: find
#define TD_TIME 3000//6000
#define TD_ALT_TIME 3000
and change it to whatever suit u, (3000 = 3secs)

Note, there another TD_ALT_TIME just below :rolleyes:
just comment it ... (by putting // at the start of the line)

5: next, find
gentity_t *WP_FireThermalDetonator( gentity_t *ent, qboolean altFire )
in that function locate

bolt->bounceCount = -5;

i presume that means bounce 5 times (y the negative value?)
change it to whatever suit u

6: save the file (duh :p)

7: in that same directory, run game.bat

8.: once the batch script done,
open pakscape.exe (in your gamedata dir usaly)
create a new pk3 with a vm folder
the batch script produced a file jk2mpgame.qvm
in gamedata/code/base/vm
place that file in the pk3 vm folder

9.: save the pk3 in a new folder in your gamedata dir
example gamedata/Eskimo/
and the file name Eskimo.pk3 (not sure of this, but to b safe)

10.: enjoy :D

wanna learn C ? try this (http://www.cyberdiem.com/vin/learn.html)

Business_Eskimo
07-03-2003, 05:17 PM
Thanks a lot, this is just what i need.