Home   Help Search Login Register  

Author Topic: dual ammotype problem...  (Read 919 times)

0 Members and 1 Guest are viewing this topic.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
dual ammotype problem...
« on: 15 Oct 2005, 12:09:49 »
i've done a search, came up with a few results but none of them are working for me... this one in particular.

the problem, in brief, is that when adding a weapon with two ammotypes (such as the kozlice or the m16grenadelauncher) with a script, the spacebar needs to be pressed in order to select it. selectweapon works for all weapons except those with dual ammotypes.

the solution offered above (as far as i understand it) was to add all the weapon types to the loon - along with magazines, then remove them all. i've tried various combinations of this, but nothing's helping.

any ideas?
« Last Edit: 15 Oct 2005, 12:10:21 by bedges »

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:dual ammotype problem...
« Reply #1 on: 15 Oct 2005, 12:21:47 »
Does removing and then adding the weapon back not do it:

_weop = primaryWeapon loon
loon removeWeapon _weop
loon addWeapon _weop

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:dual ammotype problem...
« Reply #2 on: 15 Oct 2005, 13:01:42 »
well, this script i'm working on removes all weapons by necessity, adding them back one at a time. it's a weapon selection script, and frankly it's doing my nut in, getting all the combinations right ;)


Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:dual ammotype problem...
« Reply #3 on: 15 Oct 2005, 13:17:01 »
for dual ammo weapons you have to select a specific muzzle type when you select a weapon to have it immediately ready

eg


_primary = primaryweapon player
?(_primary == "M16GrenadeLauncher"): _primary = "M16Muzzle"
?(_primary == "Ak74GrenadeLauncher"): _primary = "AK74Muzzle"
?(_primary == "Ak47GrenadeLauncher"): _primary = "AK47Muzzle"

player selectWeapon (_Primary)

In most but not all cases you simply need to add string "Muzzle" to the end of the weapon classname

here are some addon weapons for ya

You can use the fired event to get the muzzle classname for any additional weapons that dont work

Because the rule of "add "Muzzle" to the classname doesnt always work

you cant just get away with

_muzzle = call (primaryweapon Player + "_Muzzle")
Player selectweapon _muzzle


Oh why cant addon makers get their heads together and standardize this stuff

?(_Primary == "BAS_M4MKACOG")      : _Primary = "BAS_M4Muzzle"
?(_Primary == "BAS_M4desMKACOG")      : _Primary = "BAS_M4Muzzle"
?(_Primary == "BAS_M4MKREFLEX")      : _Primary = "BAS_M4RMuzzle"
?(_Primary == "BAS_M4desMKREFLEX")   : _Primary = "BAS_M4RMuzzle"
?(_Primary == "BAS_M4ReflexM203")      : _Primary = "BAS_M4ReflexMuzzle"
?(_Primary == "BAS_M4ReflexSM203")   : _Primary = "BAS_M4ReflexSMuzzle"
?(_Primary == "BAS_M4desReflexM203")   : _Primary = "BAS_M4ReflexMuzzle"
?(_Primary == "BAS_M4desReflexSM203")   : _Primary = "BAS_M4ReflexSMuzzle"
?(_Primary == "BAS_M4desReflexM203")   : _Primary = "BAS_M4ReflexMuzzle"
?(_Primary == "BAS_M4desReflexSM203")   : _Primary = "BAS_M4ReflexSMuzzle"
; JAM
?(_Primary == "JAM_M16GL")      : _Primary = "JAM_M16Muzzle"
?(_Primary == "JAM_AKMGL")      : _Primary = "JAM_AKMMuzzle"
?(_Primary == "JAM_AK74GL")      : _Primary = "JAM_AK74Muzzle"
; Laser
?(_Primary == "LSR_jak103gp")      : _Primary = "LSR_jak103Muzzle"
?(_Primary == "LSR_jaksubgp")      : _Primary = "LSR_jaksubMuzzle"
?(_Primary == "LSR_jak74mgp")      : _Primary = "LSR_jak74mMuzzle"
; SEB NAM
?(_Primary == "sebak47gl")      : _Primary = "sebak47muzzle"
?(_Primary == "sebm16a1gl")      : _Primary = "sebm16a1muzzle"
?(_Primary == "sebcar15gl")      : _Primary = "sebcar15muzzle"
; SWI PE90
?(_Primary == "SWI_Pe90GL")      : _Primary = "SWI_Pe90Muzzle"
; SUCHEY & EARL
?(_Primary == "C8XM16M203")               : _Primary = "M16Muzzle"
?(_Primary == "C8XM16M203reflex")         : _Primary = "M16Muzzle"
?(_Primary == "C8XM16M203acog")           : _Primary = "M16Muzzle"
?(_Primary == "C8XM16M203cco")            : _Primary = "M16Muzzle"
?(_Primary == "C8XM4M203")                : _Primary = "M4Muzzle"
?(_Primary == "C8XM4M203cco")             : _Primary = "M4Muzzle"
?(_Primary == "C8XM4M203reflex")          : _Primary = "M4Muzzle"
?(_Primary == "C8XM4M203acog")            : _Primary = "M4Muzzle"
?(_Primary == "C8XM4M203_SD")             : _Primary = "M4Muzzle"
?(_Primary == "C8XM4M203reflex_SD")       : _Primary = "M4Muzzle"
?(_Primary == "C8XM4M203acog_SD")         : _Primary = "M4Muzzle"
?(_Primary == "C8XM4M203cco_SD")          : _Primary = "M4Muzzle"
?(_Primary == "C8XAK74MGP25")             : _Primary = "AK74MMuzzle"
?(_Primary == "C8XAK74MGP25cobra")        : _Primary = "AK74MMuzzle"
?(_Primary == "C8XAK74MGP251p29")         : _Primary = "AK74MMuzzle"
?(_Primary == "C8XAK74MGP25_sd")          : _Primary = "AK74MMuzzle"
?(_Primary == "C8XAK74MGP25cobra_SD")     : _Primary = "AK74MMuzzle"
?(_Primary == "C8XAK74MGP251p29_SD")      : _Primary = "AK74MMuzzle"
?(_Primary == "C8XAKS74UBS1")             : _Primary = "AKS74UMuzzle"
?(_Primary == "C8XAKS74UBS1cobra")        : _Primary = "AKS74UMuzzle"
?(_Primary == "C8XJAMM16M203")            : _Primary = "M16Muzzle"
?(_Primary == "C8XJAMM16M203reflex")      : _Primary = "M16Muzzle"
?(_Primary == "C8XJAMM16M203acog")        : _Primary = "M16Muzzle"
?(_Primary == "C8XJAMM16M203cco")         : _Primary = "M16Muzzle"
?(_Primary == "C8XJAMM4M203")             : _Primary = "M4Muzzle"
?(_Primary == "C8XJAMM4M203cco")          : _Primary = "M4Muzzle"
?(_Primary == "C8XJAMM4M203reflex")       : _Primary = "M4Muzzle"
?(_Primary == "C8XJAMM4M203acog")         : _Primary = "M4Muzzle"
?(_Primary == "C8XJAMM4M203_SD")          : _Primary = "M4Muzzle"
?(_Primary == "C8XJAMM4M203reflex_SD")    : _Primary = "M4Muzzle"
?(_Primary == "C8XJAMM4M203acog_SD")      : _Primary = "M4Muzzle"
?(_Primary == "C8XJAMM4M203cco_SD")       : _Primary = "M4Muzzle"
?(_Primary == "C8XJAMAK74MGP25")          : _Primary = "AK74MMuzzle"
?(_Primary == "C8XJAMAK74MGP25cobra")     : _Primary = "AK74MMuzzle"
?(_Primary == "C8XJAMAK74MGP251p29")      : _Primary = "AK74MMuzzle"
?(_Primary == "C8XJAMAK74MGP25_sd")       : _Primary = "AK74MMuzzle"
?(_Primary == "C8XJAMAK74MGP25cobra_SD")  : _Primary = "AK74MMuzzle"
?(_Primary == "C8XJAMAK74MGP251p29_SD")   : _Primary = "AK74MMuzzle"
?(_Primary == "C8XJAMAKS74UBS1")          : _Primary = "AKS74UMuzzle"
?(_Primary == "C8XJAMAKS74UBS1cobra")     : _Primary = "AKS74UMuzzle"
« Last Edit: 15 Oct 2005, 13:25:02 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:dual ammotype problem...
« Reply #4 on: 15 Oct 2005, 13:23:52 »
Terox, you BEAUTY!  :-*

thankyou sir. perhaps this should go into the FAQ...

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:dual ammotype problem...
« Reply #5 on: 15 Oct 2005, 13:25:28 »
glad to help m8
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Kyle Sarnik

  • Guest
Re:dual ammotype problem...
« Reply #6 on: 15 Oct 2005, 18:49:57 »
Oh why cant addon makers get their heads together and standardize this stuff

Because two different weapons with different classnames can share the same muzzle classes, its alot better to do it that way then to make new muzzles for each weapon. Also, classnames are better when they are short, and muzzle is a long word to put into a classname. I mean imagine "BAS_M4desReflexSM203_Muzzle", thats just too long for convenience (well so is the original classname too, I would have used "M4RXSM203d" or something).

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:dual ammotype problem...
« Reply #7 on: 16 Oct 2005, 13:10:16 »
Because two different weapons with different classnames can share the same muzzle classes, its alot better to do it that way then to make new muzzles for each weapon. Also, classnames are better when they are short, and muzzle is a long word to put into a classname. I mean imagine "BAS_M4desReflexSM203_Muzzle", thats just too long for convenience (well so is the original classname too, I would have used "M4RXSM203d" or something).

Depends on your approach and the way you use classnames in a script etc.
You only have to look at bedges problem above, if this was a community wide script he was making then simply look at how many query lines his script has to run

If a standardisation approach was used (Its too late now anyway) then  all those lines could have been changed to a simple
Call {classname + "Muzzle"} command and that script would work for any addon released

and all thats needed to do that is a few additions to a config, which is simply text

It isnt just about muzzle names its about dozens of things they get up too when making addons.

Oily looking weapons /  config attribiutes that differ so much, addon dependencies that shouldnt be there and oh yeah, another version M4A1 to add to the list of weapons

Too high a polygon count for mp usage, fine if you just want half a dozen units on your typical  BAS SF blow something up and fly away in a helo, but when you try to do a full scale maxed out to the limit ai on demand mission its simply lags the hell out of it without large numbers of units present.


Problem i see with the average addon maker, they spend so much time creating a fantastic looking model, and they do a cracking job of it too in a lot of cases

That they forget why they are actually creating them.

About 8 months ago we started looking at addon units as a basis for a mod i was involved with, some of the units looked awesome, but when we tried to test them as per fps and cpu load, they were just too much, better option was to have a lower polygon count model and more of them on the map.

Thats a massive problem that i see in the addon community

are they making models to show their true prowess off or are they making models for use in OFP


Oh and dont get me wrong, i admire the work that any addon maker does, it requires hours and hours of effort, frutration and in return they get nothing but unconstructive criticism by those that have no idea what is involved.
I just think taking a step back and thinking about the end product from a different perspective would allow their work to be used and appreciated by a more widespread audience.

All that effort going to waste!!!!!
« Last Edit: 16 Oct 2005, 13:32:23 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Kyle Sarnik

  • Guest
Re:dual ammotype problem...
« Reply #8 on: 16 Oct 2005, 18:46:10 »
Depends on your approach and the way you use classnames in a script etc.
You only have to look at bedges problem above, if this was a community wide script he was making then simply look at how many query lines his script has to run

If a standardisation approach was used (Its too late now anyway) then  all those lines could have been changed to a simple
Call {classname + "Muzzle"} command and that script would work for any addon released

and all thats needed to do that is a few additions to a config, which is simply text

It isnt just about muzzle names its about dozens of things they get up too when making addons.

Config writers don't like to have to write the same things over and over again, if they can make a single muzzle for all of their weapons then they will do it. And it isn't impossible to find the muzzles of weapons with a script, you could use a firedEH that constructs a global array of weapons and their muzzles.