I'm starting to believe that I'm trying to chew too big a piece with this...
The MachoMans script works fine, and I'm still wondering why in the name of all that is holy I didn't come up with it myself...
------
As I'm trying make the AI deploy the portable weapon systems (specially in FDF Mod...) so the weapon takes two guys to carry it; the other carries the weapon part (like Machine Gun or TOW tube) and the other carries the tripod (a 'dummy' weapon), so I had to 're-write' the MachoMans script a bit to get two arrays; units who carry the weapon and units who carry the tripods... This also works like a charm...
The current script 'bundle' I've made does make the AI deploy these weapons, but only with one weapon per group and that weapon needs to be specified by the mission maker...
What I need to achieve now is that the mission makers wouldn't have to specify the weapons him/herself as they would be defined in the scripts already. This would free the mission maker to use any of the portable weapon systems without a worry... This is why I needed that units weapons compared to the weapon array... I also hoped that this would 'enable' the use of more than one weapon of the same kind, in other words you could have two iTOWs, two Konkurs' and so on...
The current scripts do not support that feature...
Can be done so far: with array of weapons and array of tripods I can have the corresponding array of weaponcarriers and array of tripodcarriers... A big thanks to you guys… This does liberate mission maker from the definition process…
The next problems are so complex in a way that I just can't explain them to you… Instead I'll make a numbered list what features the script(s) should have and answer your questions should there rise any. And I'm
NOT (bur hey, not stopping you either
)asking you to write any scripts for me, merely just a ‘professional' opinion wether these ‘features' are even possible to code:
1.Check who carries which weapons. If there's portable weapons present make arrays of the units who carry the weapon part and units who carry the tripod part. DONE.
2.Then check for ‘pairs' so that the weapon carrier and the unit who carries the tripod for that weapon are defined as weaponCarrier and tripodCarrier for that particular weapon. TODO.
3.Add an action per ‘pair' for the player so that the first ‘pair' responds to the first action and so on. Name the action relating the weapons name (maybe I'll need an array of names also…). TODO.
4.When an action for weapon deploy is called the ‘pair' ‘belonging' to that certain action performs the deploy process. TODO.
As said, I'm running out of ‘talent' with this thing …
So again, I may be up to something too big for me, as usual... :-\
Here's (save target as…) the current version of the scripts I have working, WITHOUT the array ‘features' and such… The original one specific weapon version…
Needs the
FDF Mod 1.2