Realistic Ballistics?
Posted: Sat Nov 10, 2007 18:25
First things first, I take no credit for the code below, it is being used for my own personal ejoyment for my own personal modification.
It will not be released to the public and I have permission to use this from corey.
Now,
I'v got a question on how to go about doing something.
Heres what I want to do in order to balance out the shotguns in Game.
I'm going to have the primary attack of 10 pellets for example at a range of 1024 obviously. On top of the primary attack I want the gun to also eject an attack of 6 pellets up to say a range of20.
Now I know there is a way to do it with the EJECT function so that these extra pellets with only limited range wont use an extra shell.
The Problem is I have made these new attack scripts, but when I put them into the weapon code in game there are no extra short range pellets.
I feel it would make the shotguns much more realistic by making them deadly at very close range but only slightly injure at longer ranges,
instead of constantly having the same amount of overly lethal pellets the whole way.
It should be the same process as say ejecting shells or smoke, is it not?.
Heres my attack script that I made:
[PLAYER_GUNSHOT]
ATTACKTYPE=SHOT;
SHOTCOUNT=6;
DAMAGE.VAL=4;
DAMAGE.MAX=12;
ACCURACY_ANGLE=8;
ACCURACY_SLOPE=7;
ENGAGED_SOUND=SAWED1;
ATTACKRANGE=20;
PUFF=SPUFF;
And heres the weapon I tried to add it too:
[SAWED_OFF]
AMMOTYPE=SHELLS;
AMMOPERSHOT=1;
AUTOMATIC=TRUE;
SEC_AMMOTYPE=BULLETS;
SEC_AMMOPERSHOT=1;
CLIPSIZE=6;
BINDKEY=3;
PRIORITY=18;
ATTACK=PLAYER_SAWEDOFF;
SECOND_ATTACK=PLAYER_FLARE;
START_SOUND="WEAPU?";
SHOWCLIP=TRUE;
BOBBING=50%;
SWAYING=25%;
STATES(UP)=SAWD:A:1:NORMAL:RAISE;
STATES(DOWN)=SAWD:A:1:NORMAL:LOWER;
STATES(READY)=SAWD:A:1:NORMAL:READY;
STATES(ATTACK)=SAWD:A:0:NORMAL:CHECKRELOAD,
SAWD:A:2:NORMAL:SHOOT, //all b
>>>>>SAWD:A:0:NORMAL:EJECT(PLAYER_GUNSHOT),<<<<<
SAWD:A:0:NORMAL:EJECT(SSG_SMOKE1),
SAWD:A:0:NORMAL:EJECT(PLAYER_GUN3_SPARKS),
SAWD:A:0:NORMAL:EJECT(SSG_SMOKE1),
SAWD:A:0:NORMAL:EJECT(PLAYER_GUN3_SPARKS),
SAWD:A:0:NORMAL:EJECT(SSG_SMOKE1),
SAWD:A:0:NORMAL:EJECT(PLAYER_GUN3_SPARKS),
SAWD:A:2:NORMAL:KICK(0.08), //c
SAWD:E:2:NORMAL:NOTHING,
SAWD:D:1:NORMAL:NOTHING,
SAWD:A:2:NORMAL:NOTHING,
SAWD:F:3:NORMAL:NOTHING,
SAWD:G:4:NORMAL:PLAYSOUND(SAWED2),
SAWD:H:4:NORMAL:EJECT(SAWEDOFF_SHELL_SPAWN),
SAWD:G:5:NORMAL:NOTHING,
SAWD:F:4:NORMAL:NOTHING,
(Yaddy yadda......)
#REMOVE;
[/b]
It will not be released to the public and I have permission to use this from corey.
Now,
I'v got a question on how to go about doing something.
Heres what I want to do in order to balance out the shotguns in Game.
I'm going to have the primary attack of 10 pellets for example at a range of 1024 obviously. On top of the primary attack I want the gun to also eject an attack of 6 pellets up to say a range of20.
Now I know there is a way to do it with the EJECT function so that these extra pellets with only limited range wont use an extra shell.
The Problem is I have made these new attack scripts, but when I put them into the weapon code in game there are no extra short range pellets.
I feel it would make the shotguns much more realistic by making them deadly at very close range but only slightly injure at longer ranges,
instead of constantly having the same amount of overly lethal pellets the whole way.
It should be the same process as say ejecting shells or smoke, is it not?.
Heres my attack script that I made:
[PLAYER_GUNSHOT]
ATTACKTYPE=SHOT;
SHOTCOUNT=6;
DAMAGE.VAL=4;
DAMAGE.MAX=12;
ACCURACY_ANGLE=8;
ACCURACY_SLOPE=7;
ENGAGED_SOUND=SAWED1;
ATTACKRANGE=20;
PUFF=SPUFF;
And heres the weapon I tried to add it too:
[SAWED_OFF]
AMMOTYPE=SHELLS;
AMMOPERSHOT=1;
AUTOMATIC=TRUE;
SEC_AMMOTYPE=BULLETS;
SEC_AMMOPERSHOT=1;
CLIPSIZE=6;
BINDKEY=3;
PRIORITY=18;
ATTACK=PLAYER_SAWEDOFF;
SECOND_ATTACK=PLAYER_FLARE;
START_SOUND="WEAPU?";
SHOWCLIP=TRUE;
BOBBING=50%;
SWAYING=25%;
STATES(UP)=SAWD:A:1:NORMAL:RAISE;
STATES(DOWN)=SAWD:A:1:NORMAL:LOWER;
STATES(READY)=SAWD:A:1:NORMAL:READY;
STATES(ATTACK)=SAWD:A:0:NORMAL:CHECKRELOAD,
SAWD:A:2:NORMAL:SHOOT, //all b
>>>>>SAWD:A:0:NORMAL:EJECT(PLAYER_GUNSHOT),<<<<<
SAWD:A:0:NORMAL:EJECT(SSG_SMOKE1),
SAWD:A:0:NORMAL:EJECT(PLAYER_GUN3_SPARKS),
SAWD:A:0:NORMAL:EJECT(SSG_SMOKE1),
SAWD:A:0:NORMAL:EJECT(PLAYER_GUN3_SPARKS),
SAWD:A:0:NORMAL:EJECT(SSG_SMOKE1),
SAWD:A:0:NORMAL:EJECT(PLAYER_GUN3_SPARKS),
SAWD:A:2:NORMAL:KICK(0.08), //c
SAWD:E:2:NORMAL:NOTHING,
SAWD:D:1:NORMAL:NOTHING,
SAWD:A:2:NORMAL:NOTHING,
SAWD:F:3:NORMAL:NOTHING,
SAWD:G:4:NORMAL:PLAYSOUND(SAWED2),
SAWD:H:4:NORMAL:EJECT(SAWEDOFF_SHELL_SPAWN),
SAWD:G:5:NORMAL:NOTHING,
SAWD:F:4:NORMAL:NOTHING,
(Yaddy yadda......)
#REMOVE;
[/b]