Home   Help Search Login Register  

Author Topic: SPON Attachments v0.3.0 (ACCEPTED)  (Read 20547 times)

0 Members and 1 Guest are viewing this topic.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Attachments (DO NOT SUBMIT)
« Reply #15 on: 22 Jan 2008, 00:37:46 »
When you replace your weapon, you don't get a "new" ammo clip. Rather, you always automatically use the most full clip in your inventory, whenever you get a new weapon. Thus, if you have 2 clips of 30 rounds and shoot 10 from the first, when you make an attachment/detachment, you will then have the 30 rounds in the weapon's magazine (20 in the spare mag). If you then fire 20 rounds from this full magazine and attach/detach, you will then be using the clip with 20 rounds remaining (with a 10-round clip left in your inventory). This would tend to leave you with lots of half-full ammo clips which is not ideal, but I don't think you actually generate ammo this way (just rechecked this, in the Attachments demo at least, and I wasn't generating any new ammo; if you have a specific different circumstance where you can generate extra ammo, then please tell me).

One annoying issue with ArmA is that you can't remove a magazine from the player and return it without refilling it. I think this might be the effect you are thinking of, but this script never manipulates magazines, only weapons themselves.

My reasoning behind using a long kneeling (well, the medic kneeling) animation was to enforce the idea that making weapons modifications wasn't something you did every 2 minutes in the field. Yes, the case of adding or removing a silencer to a pistol might only take a couple of seconds (at least based on watching James Bond movies), but all the other modifications, although performable in the field, weren't as trivial as just replacing the magazine (and were "non-combat" activities unlike just replacing a magazine). This longer and less "convenient" animation also would tend to dissuade people from continually changing configurations, which would mean that they wouldn't have so much of a problem with the half-full magazines issue.

I should, perhaps, consider an option to allow "fast" (stance-based reload animation as you suggest) or "slow" attachment/detatchment (the current kneeling medic animation). Since I need to revisit this script when I release a new version of SPON Money, to allow "loose attachements" to be bought and sold, I'll maybe add this suggestion, since although I wouldn't personally use this faster alteration, I'm sure you are not alone in wanting more instant changes (but any case, you have made the change in your own mission anyway).

(I don't think that your reloading in the script correction you give actually has an effect. All it does is reload the weapon before it is replaced, but whatever happens, when the new weapon is given you always end up with the most full magazine in the weapon automatically, this not being affected at all by which magazine was in the "pre-change" weapon).
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Robalo_AS

  • Members
  • *
Re: SPON Attachments (DO NOT SUBMIT)
« Reply #16 on: 22 Jan 2008, 01:08:34 »
Thanks for the reply.

I should test better next time, sorry about the false report about the exploit then. I shall just play a sound instead of reload _actor;  that's redundant as you explained it.
In my mission I only used your scripts for attaching/detaching suppressors hence the need to replace the anim. It would be great to add the fast action parameter as you suggested.

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: SPON Attachments (DO NOT SUBMIT)
« Reply #17 on: 22 Jan 2008, 02:03:05 »
Not a problem. I've made dafter bug-reports in my time ;P
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline He||razør

  • Members
  • *
Re: SPON Attachments v0.3.0 (ACCEPTED)
« Reply #18 on: 08 Feb 2010, 13:44:15 »
Hey all,
I'm looking for this script, as it's no longer available on the ofpec the site here.  I lost it back since the move from ArmA to ArmA2.  What I'm really trying to do also is get this to work with ACE2 as well for a mission I've been developing.  Any help or direction would be appreciated.  Thanks!

-He||
« Last Edit: 08 Feb 2010, 13:47:01 by He||razør »

Offline zonker3210

  • Members
  • *
Re: SPON Attachments v0.3.0 (ACCEPTED)
« Reply #19 on: 09 Feb 2010, 06:05:29 »
If the script isn't available here, you can probably just un-pbo a mission that uses it and grab the script from there. I know that the Afghan Village Raid mission uses it because I used SPON Attachments when designing that one.

I'm not sure whether it works for Arma2, though. If you're looking for something for Arma2, you may want to check out shk's gear script. Even if the default loadouts aren't exactly what you need for your own missions, it's easy enough to customize them to suit your needs. It's also definitely going to work with Arma2 missions! There may be some features in SPON Attachments that aren't available in shk's gear script, but I recommend checking it out nonetheless.

Hope that helps!
 - z

Offline He||razør

  • Members
  • *
Re: SPON Attachments v0.3.0 (ACCEPTED)
« Reply #20 on: 10 Feb 2010, 20:08:20 »
Hey Zonker,
Thanks a bunch man.  That is leading me in the right direction.  I really like that SHK Gear script, real streamlined for load outs. I'm having a hard time seeing where or how SPON attachments is in your Afghan map however.  I see it, but well I guess I just don't understand how it's functioning in there :confused:.  I'm a long time community player, and have just within the last few years been learning things about mission development. I'll figure out some way to do what I'm trying to accomplish. I'm really after an action menu "MP5SD" then "MP5" weapon variant switch without modifying the ammo on the player, using variants out the ACE2 ammo list to make it as realistic as possible.  From what I remember that's how the SPON attachments worked.  I'll keep on studying your map. 

Thanks Zonk   :)

Offline zonker3210

  • Members
  • *
Re: SPON Attachments v0.3.0 (ACCEPTED)
« Reply #21 on: 11 Feb 2010, 02:13:21 »
You know what? I'm an idiot. Seriously. I just realized that we're talking about two totally different things...I was talking about SPON Kits (which is what I'm using in that Afghan mission). Meanwhile, you've been asking about SPON Attachments. They are, as I understand it, different things altogether. Both shk_gear and SPON Kits are intended to assign loadouts at the start of the mission (or when someone (re)spawns in, of course). I don't believe that either one is designed to handle situations where you're changing weapon attachments (scopes, silencers, etc.) in mid-mission, though. You might be able to get away with some clever usage of the shk_gear/SPON Kits scripts but I've not tried that myself....perhaps defining a public variable to indicate the weapon configuration currently in-use by a specific unit...? Not sure that'd work, though.

Again, I'm really sorry if I totally wasted your time with the shk gear and/or SPON Kits info...I misunderstood your original question.
 - z

Offline He||razør

  • Members
  • *
Re: SPON Attachments v0.3.0 (ACCEPTED)
« Reply #22 on: 11 Feb 2010, 10:27:44 »
Hey don't be sorry man, I learned a lot about kits, which is another approach to what I'm trying to accomplish.  I got the SHK kit to go so far before it gets stuck in between weapons.  It removes the original kit in game, on an action switch, but then never delivers the new one, which would be the same rifle but a suppressed variant.  I was incredibly surprised to see I had achieved even this :D.  My only guess is that it has something to do with the string in the init, not being able to be re-initiated after being run through at mission startup.  I'm thinking that will possibly need a looping if else statement to keep it checking on which one the player should be carrying and then deliver the correct kit :dunno:.  There's probably a more sophisticated approach to this which goes way over my head. I'm gonna keep on it, until I get this working, in some form or another. Really though Zonker, thanks again for your time, help & direction.

-He|| 

Offline zonker3210

  • Members
  • *
Re: SPON Attachments v0.3.0 (ACCEPTED)
« Reply #23 on: 13 Feb 2010, 04:01:59 »
Well, I still feel like an idiot so I wrote a script that does allow one to attach/detach a silencer...basically it's a quick swap between the m4a1_aim_camo and the m4a1_aim_sd_camo. The only problem is it seems to take a minute for the client to update with the correct weapon...which can mean that silenced weapon will sometimes sound unsilenced for a few seconds after the swap. I'm going to play around a bit more with the script to see if I can come up with a good solution to that. Regardless, I'll post a copy of the mission example in a day or two. I know there is vast room for improvement of the script but it does provide a proof-of-concept at least.

Offline andywt

  • Members
  • *
  • I'm a llama!
Re: SPON Attachments v0.3.0 (ACCEPTED)
« Reply #24 on: 05 Feb 2019, 16:01:52 »
Please can someone provide a working link for this?