|
Post by neillomax on Feb 11, 2008 18:15:16 GMT -5
Is there a mapping/modding/scripting section here. Didn't really see one so not sure where to post. Trying to work something out and can't get the information I need and can't make what I have work the way I want. Must be getting a syntax error.... ? or the scripting isn't right. Weapons swap via state files if anybody has the knowledge. .. thanks
|
|
Lamron
Benevolent Dictator
Posts: 5,214
|
Post by Lamron on Feb 11, 2008 20:42:36 GMT -5
There's not really a "modding" section on the forums here, because most of the people here are players rather than modders. However, if you're looking for someone to help with state file weapon switching, I can do that. I do extensive state file modding, and if you've been on TMT you've probably seen some of my scripts being used.
If you want to describe exactly what you are trying to do, and what you've got so far, I can probably help you out.
|
|
|
Post by neillomax on Feb 11, 2008 21:15:23 GMT -5
Good deal.
It all started out with me trying to get a mod for the panzerschrek that didn't have the face plate in your way. Hal over at TMT came up with the state file swap to give the bazooka when you call for the panzschrek. The mod worked great. I tried to do another weapon and it didn't work. not sure what I did wrong but I'll post the only thing I have left of it................ Please leave the shotty alone. I want to use it. It's only there for the test I tried... and messed up.
My goal is to leave the bazooka/panzerschrek swap intact. I want to swap all rifles, except the sniper rifles, if possible, FOR the grenade rifle. Sounds opposite of what everybody likes doesn't it ?
If it can't be done without disturbing the sniper rifles, well, that's okay. I can live without them. Here's the part of the torso script/////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
// RAISE_WEAPON // //==============================================================================
state RAISE_WEAPON { movetype legs
entrycommands { viewmodelanim pullout
// just to make sure nothing funky's // attached that shouldn't be. correctweaponattachments }
states { RAISE_PISTOL : IS_NEW_WEAPONCLASS "mainhand" "pistol" RAISE_RIFLE : IS_NEW_WEAPONCLASS "mainhand" "rifle" RAISE_SHOT_FIX : IS_NEW_WEAPON "mainhand" "shotgun" RAISE_RIFLE : IS_NEW_WEAPON "mainhand" "Gewehrgranate" RAISE_GRENADE : IS_NEW_WEAPONCLASS "mainhand" "grenade" RAISE_SMG : IS_NEW_WEAPONCLASS "mainhand" "smg" RAISE_MG : IS_NEW_WEAPONCLASS "mainhand" "mg" // RAISE_PISTOL : IS_NEW_WEAPONCLASS "mainhand" "item" // hold all items like a pistol for now RAISE_PANZ_FIX : IS_NEW_WEAPON "mainhand" "Panzerschreck" RAISE_HEAVY : IS_NEW_WEAPONCLASS "mainhand" "heavy" RAISE_PAPERS : IS_NEW_WEAPON "mainhand" "Papers" // RAISE_RIFLE : default RAISE_NOANIM : default } }
state RAISE_NOANIM { entrycommands { // delay the activation for a frame so that the player // spends at least one frame without a weapon, thus // letting the legs state know that we've switched commanddelay 0.05 activatenewweapon commanddelay 0.05 forcetorsostate "STAND" }
// states // { // STAND : default // } }
state RAISE_PANZ_FIX { entrycommands { takeall give "models/weapons/steilhandgranate.tik" give "models/weapons/nebelhandgranate.tik" give "models/weapons/p38.tik" give "models/weapons/bazooka.tik" commanddelay 0.25 forcetorsostate "STAND" use "models/weapons/bazooka.tik" }
state RAISE_SHOT_FIX { entrycommands { takeall give "models/weapons/steilhandgranate.tik" give "models/weapons/nebelhandgranate.tik" give "models/weapons/p38.tik" give "models/weapons/shotgun.tik" commanddelay 0.25 forcetorsostate "STAND" use "models/weapons/shotgun.tik" }
state RAISE_RIFLE { movetype legs
///////////////////////////////////////////////////////////////////////////
If you mod it up, if you would, please e-mail me the global/torso script. I might mess it up even if I copy and paste...........lol.. Thanks Lamron, NEIL
|
|
Lamron
Benevolent Dictator
Posts: 5,214
|
Post by Lamron on Feb 11, 2008 22:19:41 GMT -5
It can be done without trading the sniper rifles.
Let me make sure I understand what you want:
Panzerschrek => Bazooka Enfield => Gewehrgranate (Mortar Rifle) Garand => Gewehrgranate KAR 98 => Gewehrgranate Mosin Nagant => Gewehrgranate All other weapons unaffected.
Is that everything? This is for SH, right?
|
|
|
Post by neillomax on Feb 11, 2008 23:04:53 GMT -5
Yes, that seems to be what I want but with one change.
I was thinking it over for a while and would like all SNIPER rifles to be the German sniper semi auto rifle. If that's do-able. if not, no problem.
Yes, it is for Spearhead.
Hate to drop the extra on you.
When this is said and done, I hope I can finally realize what I was doing wrong. I hate being beaten like this. The states should be relatively straight forward and It's killing me.
...................... thanks
|
|
Lamron
Benevolent Dictator
Posts: 5,214
|
Post by Lamron on Feb 12, 2008 1:13:11 GMT -5
You can download the finished and tested file here: www.lamronsplayground.com/downloads/zzzzWeaponTrader.pk3Here are the changes I made: state RAISE_WEAPON { movetype legs
entrycommands { viewmodelanim pullout
// just to make sure nothing funky's // attached that shouldn't be. correctweaponattachments }
states { // ********Make All Snipers Use The G43********* RAISE_SNIPER_TRADE : IS_NEW_WEAPON "mainhand" "Springfield '03 Sniper" RAISE_SNIPER_TRADE : IS_NEW_WEAPON "mainhand" "SVT 40" RAISE_SNIPER_TRADE : IS_NEW_WEAPON "mainhand" "KAR98 - Sniper" RAISE_RIFLE : IS_NEW_WEAPON "mainhand" "G 43"
// ********Make All Rifles Use The Gewehrgranate (Mortar Rifle)********* RAISE_RIFLE_TRADE : IS_NEW_WEAPON "mainhand" "Lee-Enfield" RAISE_RIFLE_TRADE : IS_NEW_WEAPON "mainhand" "M1 Garand" RAISE_RIFLE_TRADE : IS_NEW_WEAPON "mainhand" "Mauser KAR 98K" RAISE_RIFLE_TRADE : IS_NEW_WEAPON "mainhand" "Mosin Nagant Rifle" RAISE_RIFLE : IS_NEW_WEAPON "mainhand" "Gewehrgranate"
// ********Give Panzerschreck Instead Of Bazooka ********* RAISE_PANZ_FIX : IS_NEW_WEAPON "mainhand" "Panzerschreck" RAISE_HEAVY : IS_NEW_WEAPONCLASS "mainhand" "heavy"
RAISE_PISTOL : IS_NEW_WEAPONCLASS "mainhand" "pistol" RAISE_RIFLE : IS_NEW_WEAPONCLASS "mainhand" "rifle" RAISE_GRENADE : IS_NEW_WEAPONCLASS "mainhand" "grenade" RAISE_SMG : IS_NEW_WEAPONCLASS "mainhand" "smg" RAISE_MG : IS_NEW_WEAPONCLASS "mainhand" "mg" RAISE_PAPERS : IS_NEW_WEAPON "mainhand" "Papers" RAISE_NOANIM : default } }
//********** Start Special Trading States *****************
state RAISE_SNIPER_TRADE { entrycommands { takeall give "models/weapons/m2frag_grenade.tik" give "models/weapons/m18_smoke_grenade.tik" give "models/weapons/colt45.tik" give "models/weapons/g43.tik" commanddelay 0.25 forcetorsostate "STAND" use "models/weapons/g43.tik" } }
state RAISE_RIFLE_TRADE { entrycommands { takeall give "models/weapons/m2frag_grenade.tik" give "models/weapons/m18_smoke_grenade.tik" give "models/weapons/colt45.tik" give "models/weapons/kar98_mortar.tik" commanddelay 0.25 forcetorsostate "STAND" use "models/weapons/kar98_mortar.tik" } }
state RAISE_PANZ_FIX { entrycommands { takeall give "models/weapons/steilhandgranate.tik" give "models/weapons/nebelhandgranate.tik" give "models/weapons/p38.tik" give "models/weapons/bazooka.tik" commanddelay 0.25 forcetorsostate "STAND" use "models/weapons/bazooka.tik" } }
//********** End Special Trading States *******************
|
|