Jump to content
Sign in to follow this  
matt_baker1942

Can you customize magazine's like attachments?

Recommended Posts

Hey guys, I've been working on adding an M4 to the game and with the new system of attachments, I was wondering if maybe there was a way to set up magazine's like attachments? I noticed in game the magazine is basically in the same area as other weapon attachments, and I was wondering if maybe it could be set up so when I put a 20 round mag in my M4, it shows a shorter, 20 round mag instead of my 30 round Stanag, or any other combo of magazine's. Im not sure how people even learned how to set up attachments in O2 (since everything is binarized), so maybe this is something nobody has discovered yet, but is still possible?

Edit: After looking a little bit more I don't think its possible. I put a 100rnd mag into one of BIS's stock guns instead of it's regular 30Rnd and it didnt seem to change. I'm gonna go kick myself for making a pointless thread, my apologies.:(

Edited by Matt_Baker1942

Share this post


Link to post
Share on other sites

Aye, the magazine hiding when reloading is just that, it hides part of the base weapon model - there's no way to make visually different magazines yet - looks even worse when you figure that a M249 can also take a 30rnd magazine as well as the belt felt.

Share this post


Link to post
Share on other sites

Yeah it threw me off in game looking at where the mag was in my inventory. Would be cool if somebody found a way to do it.

Share this post


Link to post
Share on other sites

yeah, I thought it would finally come as a "feature", but... if only magazine would be a proxy...

I would love new tacticool AKs with RPK like drum mag.

Share this post


Link to post
Share on other sites
Aye, the magazine hiding when reloading is just that, it hides part of the base weapon model - there's no way to make visually different magazines yet - looks even worse when you figure that a M249 can also take a 30rnd magazine as well as the belt felt.

Just spitballing ideas here, but with hidden selections now being a thing with weapons would it not be possible then to with some extended event handler magic or otherwise script such a set up?

Taking the M249/Minimi as the easiest example. You have a single model with two separate magazine selections. One for the magazine, one for the belt box. Event handler or other such script detects change in currentMagazine player and displays the correct selection.

Share this post


Link to post
Share on other sites
Just spitballing ideas here, but with hidden selections now being a thing with weapons would it not be possible then to with some extended event handler magic or otherwise script such a set up?

Taking the M249/Minimi as the easiest example. You have a single model with two separate magazine selections. One for the magazine, one for the belt box. Event handler or other such script detects change in currentMagazine player and displays the correct selection.

have they added hidden selections to weapons now? I haven't develed into weapons yet, and this was always one of the last things missing from weapons in A2.

Share this post


Link to post
Share on other sites

Yep, hiddenselection works on weapons now so you can have multiple camo textures variants for one model.

However, I'm not sure that it can be used 'on the fly' as it were; so far I've only seen it initialised via the config rather than syntax to do change it ingame (e.g object setobjecttexture... - need something to point 'object' to a specific weapon being carried).

Still not sure that you can have 'user' source animations on weapons either, which would be a more useful way of generating interactive visual features on a weapon.

Share this post


Link to post
Share on other sites
have they added hidden selections to weapons now? I haven't develed into weapons yet, and this was always one of the last things missing from weapons in A2.

Yes, as da12thMonkey has pointed out they do now work on weapons, I've not poked around much with how it could be on the fly however, I will likely spend some time investigating this myself soon.

My initial thoughts would be using the currentWeapon player/this combination to hook into the weapon being used by the player but obviously, as I've said I've not poked around with it either.

A further consideration would be a system that works by replacing the weapon with an identical, in terms of config, equivalent with the correct magazine based upon CurrentMagazine player or similar.

Again, talking purely of the top of my head with most of the above.

Share this post


Link to post
Share on other sites

Good stuff, glad they're finally bringing the weapons totally up to par with the oppurtunitis presented in every other class. Back in the day we had modelspecial for changing models on the fly, such as adding bayonets/mortars etc. I'm not sure if it's even used/coded anymore these days, but seeing as it reacts to the magazine loaded (i.e. adding a rifle grenade in OFP), then it stands to reason that you could use modelspecial to swap between 5.56 link or 5.56 30rnd magazine on a m249, or whatever takes your fancy.

spitballing here of course, I'm very much a vehicle man, da12th takes care of the weapons for me ;)

Share this post


Link to post
Share on other sites

I'd love to see a working version of this.

I'd much rather have one model, that has 20rnd/30rnd/magpul etc all together but as different selections. Is there even a way to define a variable like that? Such as you'd have

CfgWeapon->define magazine type class->set magazinetype variable to 1-2-3 etc, then in the cfgmodel's call upon that variable in some way?

Share this post


Link to post
Share on other sites

I don't think there is - the only thing I know of model wise that can tie in with the magazine loaded is the modelspecial entry, and therefore you'd need a new model per magazine type.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×