-
Posts
1745 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by toutenglisse
-
Yep got it ! Another thought relative to your "issue" : "which sometimes results in bandits spawning on top of you". Here a working example of a little routine script I just wrote to create a spawnpoint for foe aircraft that is always 40km away minimum of any blue aircraft present in the session. Maybe you'll want to try if interesting. (here code + little testing .miz) function spawnFoe() local FoeSpawnZone = trigger.misc.getZone('Zone')-- ('Zone ' .. mist.random(10)) if 10 zones from 'Zone 1' to 'Zone 10' if trigger.misc.getUserFlag("1") == 0 then trigger.action.setUserFlag("1", true) end local BlueACtable = mist.makeUnitTable({'[blue][plane]', '[blue][helicopter]'}) --trigger.action.outText('Number of units : ' .. #BlueACtable, 5) --control message if #BlueACtable > 0 then local FoeSpawnPoint = mist.getRandPointInCircle(FoeSpawnZone.point, FoeSpawnZone.radius) for i = 1, #BlueACtable do local BlueACName = '' .. BlueACtable[i] local BlueACUnit = Unit.getByName(BlueACName) if BlueACUnit and BlueACUnit:isExist() == true then local BlueACPos = Unit.getPosition(BlueACUnit).p local BlueACPointV2 = mist.utils.makeVec2(BlueACPos) local dist = mist.utils.get2DDist(FoeSpawnPoint, BlueACPointV2) --trigger.action.outText('Distance spawn / ' .. BlueACtable[i] .. ' is : ' .. dist, 5) --control message if dist < 40000 then trigger.action.setUserFlag("1", false) end end end --trigger.action.outText('Flag value is : ' .. trigger.misc.getUserFlag("1"), 5) --control message if trigger.misc.getUserFlag("1") > 0 then mist.scheduleFunction(mist.dynAdd,{{country = 'USA', category = 'AIRPLANE', --spawn of a blue F15E for testing ["task"] = "CAP", ["taskSelected"] = true, ["route"] = { ["points"] = points, }, ["hidden"] = false, ["units"] = { [1] = { ["alt"] = 4000, ["hardpoint_racks"] = true, ["alt_type"] = "RADIO", ["skill"] = "EXCELLENT", ["speed"] = 200, ["type"] = "F-15E", ["y"] = FoeSpawnPoint.y, ["x"] = FoeSpawnPoint.x, ["name"] = 'Foe', ["payload"] = { ["pylons"] = { [9] = { ["CLSID"] = "{GBU-31}", }, [10] = { ["CLSID"] = "{E1F29B21-F291-4589-9FD8-3272EEC69506}", }, [13] = { ["CLSID"] = "{GBU-31}", }, }, ["fuel"] = "10246", }, ["callsign"] = 131, ["onboard_num"] = '200', }, }, ["y"] = FoeSpawnPoint.y, ["x"] = FoeSpawnPoint.x, ["name"] = 'Foe', ["communication"] = true, ["frequency"] = 127.5, }},timer.getTime()+1) else spawnFoe() end end end test-spawnaway.miz
- 481 replies
-
- customizable
- dynamic
-
(and 5 more)
Tagged with:
-
Reaction to threat "No Reaction" not working
toutenglisse replied to AirWolves=CutCut's topic in Mission Editor Bugs
True - it works. I must have done it in wrong order when trying. -
Reaction to threat "No Reaction" not working
toutenglisse replied to AirWolves=CutCut's topic in Mission Editor Bugs
Let's try to post again the .miz file... (Moderators... sorry if it represents an issue... ) (prohibit-AA-combat working by using "Do script" trigger) Edit : nope... still doesn't work test-prohibit-AA.miz -
Community poll for HARM and Maverick on stations 4 and 6
toutenglisse replied to BIGNEWY's topic in DCS: F-16C Viper
For anyone wanting to continue using a non-valid loadout in single player, it is not an issue at all. Making a weapon available on a pylon is a matter of adding a short line code in lua file. (I like having a 4 Harms equiped SEAD wingman when range is not an issue, since times when it was not available in DCS). But even without any lua change, and since actually in openBeta 4 Harms are available for F16c50, just make a loadout profile with the weapons you like and it will still be available when 4 Harms for Viper will be removed. For example in picture I kept an old F18c loadout with 2 Mk83 on centerline and it is still working, while 2 Mk83 are not available to add on centerline. So I'll just won't erase the SEAD loadout I like with F16c (6 Mavs + 2 Harms) and it will still be available in singleplayer. -
Hi, just a thought, you could use two circle zones forming a banana shape, 1 is zone IN and 2 is zone OUT (spawn inside zone 1 but outside zone 2, to have a large array of spawn azimuths accross the banana shape, of the size you want)
- 481 replies
-
- customizable
- dynamic
-
(and 5 more)
Tagged with:
-
Reaction to threat "No Reaction" not working
toutenglisse replied to AirWolves=CutCut's topic in Mission Editor Bugs
It's true I've just tried to use "no reaction" in the "triggered action" tab and it has an effect - while it has no effect if used in "advanced" waypoint/Nav tab or by scripting command. (since a while I only use scripts for my usage) But at this moment it seems to be off (latest openBeta), regarding description (No Reaction: No defensive actions will take place to counter threats). I used it in the mission file I tried to post (unavailable ?) and the effect was that the P47 just abort bombing task at the moment the action is triggered - enemy fighter was still far away (exactly description of : Allow abort missions: If a threat is deemed severe enough the AI will abort its mission and return to base.) I also tried "prohibit AA combat" using "triggered action" tab and the effect was the same (immediate abort of task), while "prohibit AA combat" works as intended when using script like in my previous example (and exactly what OP wants, like you said in previous post) and doesn't work at all when using "advanced" waypoint/Nav tab. I can't seem to be able to post files at the moment, but I think some options presently don't work as intended. -
Reaction to threat "No Reaction" not working
toutenglisse replied to AirWolves=CutCut's topic in Mission Editor Bugs
Ignore my previous post I wrote (edit) wrong things. Description of "prohibit-AA-combat" is clear (no AA combat even if engaged), and in fact this option doesn't work from Mission Editor, but works if scripted function to set this option is used. Here a .miz example that is working with scripted function (P47 is bombing a bridge - he is engaged before dropping bombs. If not shot down too early he successfully drops his bombs but in no case he engages AA combat). It is a bug related to mission editor function. I don't know for the "no reaction to threat" option (it doesn't seem to work weither from mission editor or script) -
Reaction to threat "No Reaction" not working
toutenglisse replied to AirWolves=CutCut's topic in Mission Editor Bugs
IMHO the actual AI behavior regarding "no reaction" or "forbid air-air engagement" is understandable. I mean AI respects that (even when detecting close range enemy fighters, AI will stick to its bombing task for example) until it is directly engaged - in this case "intelligence" dictate to react to avoid dying ^^. This is what I see and understand from some tests. -
You can use "radio transmission" action trigger. See description page 142-143 of "DCS User Manual EN 2020.pdf" that you find on "DCS\Doc" folder of your DCS install.
-
With mist, example to get as much messages as there are units in ropezone1, naming units (it uses flag n°1 - change to one that is free, if n°1 is already used) : local blueunits = mist.makeUnitTable({'[blue][helicopter]'}) if #blueunits > 0 then for i = 1, #blueunits do mist.flagFunc.units_in_zones({ units = {'' .. blueunits[i]}, zones = {'ropezone1'}, flag = "1", toggle = true, }) if trigger.misc.getUserFlag("1") > 0 then trigger.action.outText('' .. blueunits[i] .. ' is in ropezone1', 10) end end end Example for 3 zones : local blueunits = mist.makeUnitTable({'[blue][helicopter]'}) if #blueunits > 0 then for i = 1, #blueunits do mist.flagFunc.units_in_zones({ units = {'' .. blueunits[i]}, zones = {'ropezone1', 'ropezone2', 'ropezone3'}, flag = "1", toggle = true, }) if trigger.misc.getUserFlag("1") > 0 then trigger.action.outText('' .. blueunits[i] .. ' is in ropezones', 10) end end end If you want messages to refer to specific zone you'll have to duplicate first exeample for each zone.
-
Here a track. F15E dropping 2 CBU-105. Bomb separation from aircraft is problematic - in the track 1 bomb out of 2 goes up and disappear in aircraft (sometimes the 2 bombs disappear by hitting aircraft, sometimes they fall ok). Weather clean zero wind. + a bombing mark placed right on target is a miss as cluster+chute bomblets fall much shorter than bomb's trajectory to ground. F15E-CBU105-drop-bug.trk
-
In mission editor you can only see a 3D unit itself, not the world around it like in game. To see a specific unit with F10 map you can click it on the map and depress F2 for air unit, F7 for ground unit, F9 for ship etc...
-
I explored a F10 item way to use TGP coordinates and managed to do something working "pretty" well. Player locate a target with TGP, transmit/enter coordinates-elevation through F10 menu (from root by unbuilding menu and adding a selection of 10 numbers 0 to 9) by selecting 16 numbers in a row. (a message displays coordinates growing during process) A screen message finally displays coordinates entered (N XX°XX'XX%' E XX°XX'XX%' ELEV XXXX feet) and asks for validation or cancellation. The Vec3 point obtained is maybe not close enough for an AI Gps bomb (actually I use it to spawn a smoke that is some meters away from target) but good enough for artillery strike or AI Gps cluster glide bomb if target is soft enough (I think TGP can't display better accuracy than degree/minute/hundredth minute). thanks for the F10 menu idea.
-
The "deactivateGroup" function only works with groups, and your table is a unit table. You should use this (for all red airplanes to deactivate, 1 is red coalition and 0 is airplanes) : for i, gp in pairs(coalition.getGroups(1, 0)) do targetGroup = Group.getByName(Group.getName(gp)) trigger.action.deactivateGroup(targetGroup) end
-
In case you're still in need for, or for anyone else who needs to know, I just got usage of getammo function. Here a function I made to see how it returns values (but in purpose of checking WM's ammo). Gun ammo is the first [1] value returned, but when depleted the first entry is replaced by ammo that was in second entry. If you want to keep track of gun ammo only you could check if WeapTable[1]["desc"]["displayName"] is still equal to "M61_20_HE sans traceurs" (in my F18 exemple and in french), if not then gun ammo is zero. I put 10 entries to eventually cover varied ammo on high hardpoint count aircraft. missionCommands.addCommand('Check my ammo', nil, MA_Dec2Weapons) function MA_Dec2Weapons() local Wingman = Unit.getByName('Blue F18c 1-1') --my aircraft unitName local WeapTable = Unit.getAmmo(Wingman) if WeapTable[1] and WeapTable[1]["count"] and WeapTable[1]["desc"]["displayName"] then trigger.action.outText('You have : ' .. WeapTable[1]["count"] .. ' ' .. WeapTable[1]["desc"]["displayName"] .. '.', 10) end if WeapTable[2] and WeapTable[2]["count"] and WeapTable[2]["desc"]["displayName"] then trigger.action.outText('' .. WeapTable[2]["count"] .. ' ' .. WeapTable[2]["desc"]["displayName"] .. '.', 10) end if WeapTable[3] and WeapTable[3]["count"] and WeapTable[3]["desc"]["displayName"] then trigger.action.outText('' .. WeapTable[3]["count"] .. ' ' .. WeapTable[3]["desc"]["displayName"] .. '.', 10) end if WeapTable[4] and WeapTable[4]["count"] and WeapTable[4]["desc"]["displayName"] then trigger.action.outText('' .. WeapTable[4]["count"] .. ' ' .. WeapTable[4]["desc"]["displayName"] .. '.', 10) end if WeapTable[5] and WeapTable[5]["count"] and WeapTable[5]["desc"]["displayName"] then trigger.action.outText('' .. WeapTable[5]["count"] .. ' ' .. WeapTable[5]["desc"]["displayName"] .. '.', 10) end if WeapTable[6] and WeapTable[6]["count"] and WeapTable[6]["desc"]["displayName"] then trigger.action.outText('' .. WeapTable[6]["count"] .. ' ' .. WeapTable[6]["desc"]["displayName"] .. '.', 10) end if WeapTable[7] and WeapTable[7]["count"] and WeapTable[7]["desc"]["displayName"] then trigger.action.outText('' .. WeapTable[7]["count"] .. ' ' .. WeapTable[7]["desc"]["displayName"] .. '.', 10) end if WeapTable[8] and WeapTable[8]["count"] and WeapTable[8]["desc"]["displayName"] then trigger.action.outText('' .. WeapTable[8]["count"] .. ' ' .. WeapTable[8]["desc"]["displayName"] .. '.', 10) end if WeapTable[9] and WeapTable[9]["count"] and WeapTable[9]["desc"]["displayName"] then trigger.action.outText('' .. WeapTable[9]["count"] .. ' ' .. WeapTable[9]["desc"]["displayName"] .. '.', 10) end if WeapTable[10] and WeapTable[10]["count"] and WeapTable[10]["desc"]["displayName"] then trigger.action.outText('' .. WeapTable[10]["count"] .. ' ' .. WeapTable[10]["desc"]["displayName"] .. '.', 10) end end
-
acknowledged Deck crew ignore request when SC is turning
toutenglisse posted a topic in Bugs and Problems
Minor bug. Or is it intended to be like this because deck crew will yell "what are you doing !?" if rearm/refuel procedure is in progress when SC is turning ? Deck-crew-request-bug-SC-turnung.trk -
Most: Does anyone know of a good script for ground clean up?
toutenglisse replied to GR00VYJERRY's topic in Mission Editor
If you respawn these units then they respawn with the flag still true so I guess it's why conditions are met to despawn immediately... in this case the flag has to be turned false when unit gets despawned - and surely it will need 1 flag per unit instead of 1 for all units. -
Sound no longer playing bug and sound.buffersize ...
toutenglisse replied to Frag's topic in Mission Editor
Yes reminds me a case - I had several triggers calling a "squelch" sound, and on occasion 2 of them could happen at exact same time - then this sound couldn't be played again on next triggers - I had to prevent 2 calls at same time to fix it. -
If Sam site has 2 radar emitters the AI won't fire 2 harms at a time, but 1 at "max range" then will go back and fire a 2nd. "Max range" may not be max Harm's range but based on radar emitter's range, because later when Search radar stopps emitting F18 AI can launch 2 Harms closer to Sam site - here in track. Agm88-attack-2RadarEmitters.trk
-
I noticed since last update that F18 AI, when decides to attack Sam radar with Harm, goes back to Harm max range before firing. Here 2 tracks, 1 with Sam site on Auto alarm state (when AI detects, it goes back and then fires), and 1 with Sam site on Red alarm state (AI immediately runs in and fires when in range, then before Harm reaches Sam starts a second run by going back to max range but aborts because 1st Harm hits Sam). Before update AI did fire when Sam radar detected, without going back to max range. Agm88-attack-follow-AutoStateSam.trk Agm88-attack-follow-RedStateSam.trk