An alternative non lua solution would be to check for the death of each unit in yr group and add 1 to flag x.
Then you could add triggers to check the value of flag x.
1. No, only a single unit in the group needs to be alive
(use GROUP ALIVE MORE THAN 95% for total victory)
2. " I want the player to lose the mission if Group X is attrited by more than 50%" you only need the 1 trigger condition (don't have flag x ON) as follows :-
'Group COMBAT ENGINEERS is alive less than 50% ' (= Defeat)
For just victory have
flag X ON
Group alive less than 95% and
Group alive more than 50%
This looks like an old bug I reported. Iirc it does play but does so right from the beginning of the mission as opposed to when the trigger tells it to. It's almost as if the trigger condition is not working for the sound but does for messaging.
Can you confirm? I cannot test your miz as away from dcs pc for 2 days.
Do me a favour, run the mission, quit and save the track file. Then email it to me. Quite possibly a bug that needs fixing. If possible in same track have an a10 fly past at similar distance and altitude from AAA as ka50 to prove the point. Cheers.
That script is a randomisation script I wrote quite some time ago in an earlier version of DCS when we had access to OS functions. OS functions were taken out of the scripting environment due to obvious security reasons
If you delete the line math.randomseed( OS.time() ) it should work fine.
It may be worth mentioning that the seeded value is also saved to the .trk file so that the mission plays back correctly.
The simulator scripting environment is passed a random seed. As to the code for that seed, it is done within the secure DCS environment and it's content is known only to the Dev. I suspect however that it uses the OS time to create.
JTAC is being worked on. Can't say what release it will make but we are on the case.
Btw: JTAC will take a minimum of 9 secs to respond. This prob won't change.
If I get time I will write a JTAC guide that will incorporate the current FAC, AFAC use as well as all of the upcoming changes. I've lost count of the number of hours I've spent testing JTAC code and I occasionally forget something of relevance. E.g. No BDA after type3.
Self is not the name of the unit! It's the object name, you have to use the function Unit.getByName() to get it.
Local unit = Unit.getByName('name of unit in ME')
Local unitnum = Unit.getNumber(unit)
Print(unitnum) -- Will show the number of the unit in its group as set in the ME
You will need to check that unitnum ~= nil else an error will be created (this will happen if the unit it is destroyed).
EDIT: sniped by Speed.
I can't wait until you think you have finished and have 3 pieces left over. We're then going to petition you to start all over again and get it right!
Are you 'feeling the force' yet?
Helps a lot. With DCSW and the various AI units there will always be problems/bugs and you may have found something. I shall investigate further when I have the time. Good luck with the miz building.
Bushmani
For the trigger zone check why not just use conditions on the pos.x, pos.z values from your script against a set of zone x&z constants. You could even place a list of rectangular x & z values in a table if you wanted more than. 1 zone.
Or for trigger position try
trigname = trigger.misc.getZone(triggerZoneName)
trigpos = trigname.p
trigradius = trigname.radius
triggers are altitudes = a.m.s.l.
I've had both ASUS and gigabyte boards over the years and never had any problems either of with them. I am particularly impressed with the current batch of z77 mobos from Asus though. Sometimes it's luck of the draw I think. Both companies are very large mobo manufacturers so it's no surprise that there are failures.
Looks good although if possible I would try and stretch to the latest 6 series GPUs from Nvidia. The GTX 660 Ti doesn't appear to be that much more these days.
Also depends which games you play. Here's a spec comparison
http://www.hwcompare.com/13163/geforce-gtx-560-ti-vs-geforce-gtx-660-ti/
and a youtube review