Jump to content

  • Log in with Facebook Log in with Twitter Log In with Google Log In with Steam Sign In
  • Create Account
Photo

Grenade Charging

- - - - -

  • Please log in to reply
17 replies to this topic

#1
OFFLINE   wajdzik

wajdzik

    Member

  • Members
  • PipPip
  • 24 posts
1
A step in the right direction
Hi,
I need to write lua script to random change of grenade charging. (beetwen 2 to 6 sec.) This type of script is not big problem, but i don't know what command use to change time of nade charging. Can anybody help me with this?

#2
OFFLINE   wajdzik

wajdzik

    Member

  • Members
  • PipPip
  • 24 posts
1
A step in the right direction
Ok, i found a clue - file grenade.weap and weapon.cfg

grenda.weap:
weaponDef
{
// This basically fills out weaponInfo_t
client {
  //standModel  ""		  // weapon pickup 'stand' (do we still use this?)
  //pickupModel  ""
  //pickupSound  "sound/misc/w_pkup.wav"
 
  weaponConfig  "models/weapons2/grenade/weapon.cfg"
  handsModel   "models/weapons2/grenade/v_grenade_hand.mdc"
 
  flashDlightColor 1 0.7 0.5
  flashSound   "sound/weapons/grenade/gren_throw.wav" // supports up to 4 flash sounds
  //flashEchoSound ""		  // supports up to 4 flash echo sounds
  //lastShotSound  ""		  // supports up to 4 last shot sounds
 
  //readySound  ""
  //firingSound  ""		 // no weapons seem to use this, basically it's a replacement hum for readysound, but then when firing
  //overheatSound  ""
  //reloadSound  ""
  //reloadFastSound ""		 // some weapons have fast reloads due to the skill system
  //spinupSound  ""		  // sound started when fire button goes down, and stepped on when the first fire event happens
  //spindownSound  ""		 // sound called if the above is running but player doesn't follow through and fire
  //switchSound  ""		 // allow overriding of weaponswitch sound
 
  //weaponIcon   "icons/iconw_grenade_1"
  weaponSelectedIcon "icons/iconw_grenade_1_select"
 
  missileModel  "models/ammo/grenade1.md3"
  //missileSound  ""
  missileTrailFunc "GrenadeTrail"	  // supports "GrenadeTrail", "RocketTrail", "PyroSmokeTrail" and "DynamiteTrail" (we REALLY want a particle system for this)
  //missileDlight  0
  //missileDlightColor 0 0 0	   // do we still use this?
 
  //ejectBrassFunc ""		 // supports "MachineGunEjectBrass" and "PanzerFaustEjectBrass"
 
  //modModel 1  ""
 
  firstPerson {
   model   "models/weapons2/grenade/v_grenade.md3"
   //flashModel  ""
   // weapon building
   // the parts are numbered because there are some hardcoded references for some weapons to certain parts
   weaponLink
   {
    part 0
    {
	 tag  "tag_barrel"
	 model "models/weapons2/grenade/v_grenade_barrel.mdc"
    }
   }
  }
 
  thirdPerson {
   model   "models/weapons2/grenade/ss_grenade.md3"
   //flashmodel  ""
  }
}
}

and

///////////////////////
//
//  GRENADE
//
///////////////////////

newfmt
// config file for weapon animations

//								 barrel					 barrel
//    first  length  fps  looping  anim bits  animated weap   draw bits
//	 /   ___/	  /	 /	  /		   /			  /
//    /   /   ______/	 /	  /		   /			  /
//   /   /   /   ________/	  /		   /			  /
//  /   /   /   /   ___________/		   /			  /
// /   /   /   /   /   ___________________/			  /
///   /   /   /   /   /   ______________________________/
//   /   /   /   /   /   /
0 1 20 1 0 0 0 // IDLE1
0 1 20 1 0 0 0 // IDLE2
1 2 10 0 0 0 0 // ATTACK1
//2 1 10 1 0 0 0 // ATTACK2
1 2 10 0 0 0 0 // ATTACK2
1 2 10 0 0 0 0 // ATTACK3
7 5 20 0 0 0 0 // DROP
12 4 10 0 0 0 0 // RAISE
12 4 16 0 0 0 0 // RELOAD1
12 4 16 4 0 0 0 // RELOAD2
12 4 16 0 0 0 0 // RELOAD3
0 1 20 1 0 0 0 // ALTSWITCH (SA) new alt-mode switching anim
0 1 20 1 0 0 0 // ALTSWITCH (SA) new alt-mode switching anim

but i still have no idea what value change to get different time od nade's charging :/

#3
OFFLINE   BettyBoop

BettyBoop

    Regular Member

  • Subscriber
  • PipPipPip
  • 132 posts
11
A step in the right direction
  • LocationFrance
no helps here ? and for the riflenade cus it is buggy

#4
OFFLINE   hellreturn

hellreturn

    Management

  • Management
  • PipPipPipPip
  • 2692 posts
158
On the road to fame

no helps here ? and for the riflenade cus it is buggy


What's buggy in riflenade? I have never seen any bugs for riflenades.

#5
OFFLINE   BettyBoop

BettyBoop

    Regular Member

  • Subscriber
  • PipPipPip
  • 132 posts
11
A step in the right direction
  • LocationFrance

What's buggy in riflenade? I have never seen any bugs for riflenades.

just reporting what few guys said "wont always shot"

#6
OFFLINE   Dookie

Dookie

    Advanced Member

  • Members
  • PipPipPipPip
  • 420 posts
55
Getting Better
  • LocationCroatia
never expirienced any bugs with rifle nade..

#7
OFFLINE   Petbark

Petbark

    Advanced Member

  • Members
  • PipPipPipPip
  • 185 posts
30
Getting Better
If you don't have enough chrage in the engineer bar then it will not fire.

I think level 1 takes about 70% of the charge with level 4 taking just under 50% but i might be wrong on those numbers.

#8
OFFLINE   hellreturn

hellreturn

    Management

  • Management
  • PipPipPipPip
  • 2692 posts
158
On the road to fame

just reporting what few guys said "wont always shot"


Then I would suggest to ask those "few guys" to take demo or something so we can look into it and if it's a bug we will try to fix it in next release.

What Petbark said is also true.

#9
OFFLINE   BettyBoop

BettyBoop

    Regular Member

  • Subscriber
  • PipPipPip
  • 132 posts
11
A step in the right direction
  • LocationFrance

Then I would suggest to ask those "few guys" to take demo or something so we can look into it and if it's a bug we will try to fix it in next release.

What Petbark said is also true.


will do that today

#10
OFFLINE   TheSilencerPL

TheSilencerPL

    Advanced Member

  • Management
  • PipPipPipPip
  • 3096 posts
215
On the road to fame
  • LocationPoland
Regarding the rifle grenade, maybe you mean this bug?
http://mygamingtalk....nade-animation/

#11
OFFLINE   wajdzik

wajdzik

    Member

  • Members
  • PipPip
  • 24 posts
1
A step in the right direction
So, noone can help me?

#12
OFFLINE   TheSilencerPL

TheSilencerPL

    Advanced Member

  • Management
  • PipPipPipPip
  • 3096 posts
215
On the road to fame
  • LocationPoland
Maybe you could change g_engineerChargeTime cvar.
http://mygamingtalk....ar#g_serverInfo

Dunno if it helps.

#13
OFFLINE   wajdzik

wajdzik

    Member

  • Members
  • PipPip
  • 24 posts
1
A step in the right direction
It's only change charging rilfe grenade, so its not what i'm looking for :/

#14
OFFLINE   TheSilencerPL

TheSilencerPL

    Advanced Member

  • Management
  • PipPipPipPip
  • 3096 posts
215
On the road to fame
  • LocationPoland
ah, sorry, didn't read carefully.

#15
OFFLINE   TheSilencerPL

TheSilencerPL

    Advanced Member

  • Management
  • PipPipPipPip
  • 3096 posts
215
On the road to fame
  • LocationPoland
I don't think it's possible, unless pm->ps->grenadeTimeLeft is accessible through the lua API

case WP_GRENADE_PINEAPPLE:
case WP_SMOKE_BOMB:
if(!delayedFire) {
if(PM_WeaponAmmoAvailable(pm->ps->weapon)) {
	 if(pm->ps->weapon == WP_DYNAMITE) {
	 pm->ps->grenadeTimeLeft = 50;
	 } else {
	 pm->ps->grenadeTimeLeft = 4000; // start at four seconds and count down

EDIT1:
it's hardcoded to be 4000, it's not a value set from above. We could create some server cvar for that, so you could change that.

#16
OFFLINE   wajdzik

wajdzik

    Member

  • Members
  • PipPip
  • 24 posts
1
A step in the right direction
Server cvar would be great. I think that is cvar like this in one of mods, but curently i don't remember in whichone. I'll try use your idea and create something what could change this without cvar, but i can start working with this after 15 july.

#17
OFFLINE   gaoesa

gaoesa

    Advanced Member

  • Management
  • PipPipPipPip
  • 4391 posts
341
Will become famous
  • LocationFinland
I don't think it is changeable in any mod.

#18
OFFLINE   TheSilencerPL

TheSilencerPL

    Advanced Member

  • Management
  • PipPipPipPip
  • 3096 posts
215
On the road to fame
  • LocationPoland
Yes, and after short discussion we don't think we would add separate cvar for that.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users