wajdzik Posted June 25, 2012 Share Posted June 25, 2012 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? Quote Link to comment Share on other sites More sharing options...
wajdzik Posted June 28, 2012 Author Share Posted June 28, 2012 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 :/ Quote Link to comment Share on other sites More sharing options...
Subscriber BettyBoop Posted July 8, 2012 Subscriber Share Posted July 8, 2012 no helps here ? and for the riflenade cus it is buggy Quote Link to comment Share on other sites More sharing options...
Management hellreturn Posted July 8, 2012 Management Share Posted July 8, 2012 no helps here ? and for the riflenade cus it is buggy What's buggy in riflenade? I have never seen any bugs for riflenades. Quote Link to comment Share on other sites More sharing options...
Subscriber BettyBoop Posted July 8, 2012 Subscriber Share Posted July 8, 2012 What's buggy in riflenade? I have never seen any bugs for riflenades.just reporting what few guys said "wont always shot" Quote Link to comment Share on other sites More sharing options...
Dookie Posted July 8, 2012 Share Posted July 8, 2012 never expirienced any bugs with rifle nade.. Quote Link to comment Share on other sites More sharing options...
Petbark Posted July 8, 2012 Share Posted July 8, 2012 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. hellreturn 1 Quote Link to comment Share on other sites More sharing options...
Management hellreturn Posted July 8, 2012 Management Share Posted July 8, 2012 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. Quote Link to comment Share on other sites More sharing options...
Subscriber BettyBoop Posted July 8, 2012 Subscriber Share Posted July 8, 2012 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 Quote Link to comment Share on other sites More sharing options...
Management TheSilencerPL Posted July 8, 2012 Management Share Posted July 8, 2012 Regarding the rifle grenade, maybe you mean this bug?http://mygamingtalk.com/forums/tracker/issue-145-rifle-grenade-animation/ Quote Link to comment Share on other sites More sharing options...
wajdzik Posted July 8, 2012 Author Share Posted July 8, 2012 So, noone can help me? Quote Link to comment Share on other sites More sharing options...
Management TheSilencerPL Posted July 8, 2012 Management Share Posted July 8, 2012 Maybe you could change g_engineerChargeTime cvar.http://mygamingtalk.com/wiki/index.php/Silent_Mod_Server_Cvar#g_serverInfo Dunno if it helps. Quote Link to comment Share on other sites More sharing options...
wajdzik Posted July 8, 2012 Author Share Posted July 8, 2012 It's only change charging rilfe grenade, so its not what i'm looking for :/ Quote Link to comment Share on other sites More sharing options...
Management TheSilencerPL Posted July 8, 2012 Management Share Posted July 8, 2012 ah, sorry, didn't read carefully. Quote Link to comment Share on other sites More sharing options...
Management TheSilencerPL Posted July 8, 2012 Management Share Posted July 8, 2012 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. Quote Link to comment Share on other sites More sharing options...
wajdzik Posted July 8, 2012 Author Share Posted July 8, 2012 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. Quote Link to comment Share on other sites More sharing options...
Management gaoesa Posted July 8, 2012 Management Share Posted July 8, 2012 I don't think it is changeable in any mod. Quote Link to comment Share on other sites More sharing options...
Management TheSilencerPL Posted July 8, 2012 Management Share Posted July 8, 2012 Yes, and after short discussion we don't think we would add separate cvar for that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.