So I'm going to be moving into the scripting stage regarding being able to customize the rifle. I had someone else helping me with this but I'd like other people's input as well since I'm no scripting guru. Learning what I did from the few programming classes I took I drew out a rough flow-chart for myself to determine how this would work. I also peeked a little at the WMK scripts but I'm not entirely sure how they work, not to mention the fact that the WMKs work a little different from what I'm attempting to do.
To best explain this, I'm going to try my best to write some pseudo-code to see how this would play out, and maybe then I could get some better feedback as to how to go about it.
>Script Activated through ACR Modkit item
>Run check to see if player has an ACR equipped
>If No, display a message telling them to equip one to use the mod kit.
>Else, get the current Condition value of the equipped ACR and store it in a variable. Also get stored variables for each attachment (see below)
>Bring up the menu for modification. (Is there a way to display the current settings of the ACR? As in show what's currently equipped and if they change one thing it changes in the main menu as well? Ex: 10.5" Barrel, Iron Sights, Silencer would change to 18" Barrel, Scope, Unsilenced)
>Player chooses Barrel
>10.5" with description (Higher RoF, lower accuracy) Stores "0" in barrel variable
>14.5" (Lower RoF, higher accuracy) Stores "1" in barrel variable
>18" (Semi-auto, high accuracy and damage) Stores "2" in barrel variable
>Player chooses Optics
>Iron Sights, Stores "0" in optics variable
>ACOG, stores "1"
>Scope, stores "2"
>Player chooses Silencer
>Off, Stores "0" in silencer variable
>On, stores "1"
>Finished
>Take variables, cycle through an if/then array to get the right item. Example:
IF Barrel = 0 IF Optics = 0 IF Silencer = 0 Equip ACRBar105 ELSE Equip ACRBar105SI ELSE IF Optics = 1 IF Silencer = 0 Equip ACRBar105ACOG ELSE Equip ACRBar105ACOGSI ELSE IF Silencer = 0 Equip ACRBar105Scope ELSE Equip ACRBar105ScopeSIEtc...
>Transfer condition variable from old weapon to new one
>Equip the new weapon
And that's it basically. If anyone has any ideas on how to better do it or optimize it I'm all ears. Thats's the plan I have for now but I'm not entirely positive on how to execute it.