-
Posts
772 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Events
Everything posted by SNAFU
-
"mist.makeUnitTable" issue Hi Grimes, I have got a problem I do not get around. I am trying to make a table of all existing fighters and helicoperts of a coalition, with the idea to check their positions regularly for airspace violation. I am using this script to get the units on the map: function getallredaircrafts()--ok RedAircraftstable = {'[red][plane]', '[red][helicopter]'} allredairunitsstart = {} allredairunitsstart = mist.makeUnitTable(RedAircraftstable) allredairunits = {} for a = 1, #allredairunitsstart do --local RedAircraftunit = Unit.getByName(allredairunitsstart[a]) if Unit.getByName(allredairunitsstart[a]):isExist() == true then allredairunits[#allredairunits + 1] = { name = allredairunitsstart[a] } else return end end allredairunitsTable = mist.utils.tableShow(allredairunits) --checkmessage ok trigger.action.outText("Red aircraft on map table:" ..allredairunitsTable, 2) --ok return timer.getTime() + 4 end timer.scheduleFunction(getallredaircrafts, nil, timer.getTime() + 2) Before I simply used " mist.makeUnitTable(RedAircraftstable)" to create the table without checking if the unit exists. Now this works nicely as long as no unit dies. If one of the red fighters crashes, dies or gets shot down, whatever, the function getallredaircrafts() breaks and does not give me any more results. The background is, that I am currently working on an "intercept script", which tasks fighters to intercept intruders, if no fighter is airborne, it shall spawn a fighter on the closest defined airfield. But therefore I need to track all the airplanes on the map. Attached you also find the mission I am testing the script on.... test.miz
-
Thanks for the heads up.
-
Here you have script, which now marks zones with the names "target1", "target2", "target3"... with green smoke and prints out which player dropped his BDU HD/LD training bomb how far off, in relation to the direction the player dropped his bomb. It is mandatory to name the triggerzones accordingly and to initiate MIST prior to the script. If you have more than 3 targetzones, you have to edit a line in the script: numberofzones = (integer of the number of zones you want to use) Attached you find the script and the example mission. BDUTrainingOnMultipleTargetZones_v1.rar
-
Lets assume KS project only reaches the online-regulars, not the casual gamer. This would be the 1000 folks in the golden days of IL2 Hyperlobby. Lets assume these 1000 originate from 24000 players around the world playing 1hour the day. Of these guys around 10% would play the full-real IL2 setting. So we have about 2400 potential backers. Assumed that even 50% of these 2400 are interested in DCS realism - the rest is fine with less depth of detail or frightened by too many switches - you have 1200 left. So Luthier have to convince these numer to spent over 83 USD each. I think that is a good challange, considering the experience the WWII online-gamers made the last 2 years with ambitious projects. A flyable B-17 at DCS level is something, IMHO, too far out. Even if you manage to simulate all the functions and positions a B-17 needs (pilot, copilot, engineer, navigator, gunners etc) you still need a map to fly on for over 8 hrs to the target to get shot down. So you need the navigation systems, radios, radar on the other side etc... I would sugest to keep it simple for starters and forget about the B-17 and focus efforts and capacities. That would be at least a signal to the ones of the potential backers frightened with previous experiences.
-
Well, that is a little bit more tricky. How should the programm know, which target you intent to hit? So you have to modify the script in a way, that the script compares the coordinates of where the bomb hit, with the closest targetzone around, assuming you wanted to hit that one. ;) I used a similar function my AFAC script to detect the closest unit to the smokemarker, will see if I can easily implement that function in this script, when I have time.
-
That is where my Export.lua is. :helpsmilie:
-
It is usually under: C:/User/Saved Games/DCS World Bascially means you can neither use TACVIEW, TARS nor ARIES Radio while playing on the server?
-
-ESL- Elite Pilots (24h dedicated Server) + LIVE Online AWACS Stream
SNAFU replied to masterrob09's topic in Deutsch
Moin Masterrob09, Am Samstag abend haben wir zu 3 versucht eine Runde auf deinem Server zu fliegen, mußten allerdings nach mehreren Anläufen und nach einer Stunde probieren (Schwierigkeiten mit DCS allgemein) aufgeben, da sämtliche Spieler kreuz- und querwarpten und eine gefahrloses Verlassen des Hangers einfach nicht möglich war. (Flugzeuge rutschten ohne Unterbrechung kilometer herum und explodierten natürlich entsprechend oft irgendwo auf dem apron oder an den Hangars) Auch nach einem Neustart des Servers (nach dem wir es nochmal probierten - hast du selber neugestartet oder war das ein automatischer Neustart?) wurde es nicht besser, trotz eines kleinen Pings (meiner bei 48 . Spieler wurden um die 12 angezeigt, doch wurde auch ständig dem Server beigetreten und verlassen. Vielleicht war das nun ein Ausnahmefall am Samstag, aber mein erster Verdacht war einfach, das die Mission "überladen" ist mit AI Einheiten? Schöne Grüße snafu -
Hi chromium, should be possible, but the weapon has to be identified in the "weapons table". In the beginning I also wanted to make this compatible with the russian smoke rockets, but then I would also have to script russian striker planes. Wanted to do this with a dedicated script for the red side, with Su-25 and Su34 as strikers. But to cut it short and use Ka-50 or Su-25 (if it carries the same smoke rockets?) on blue side, you simply need to change the weapon type in the line as you already figured out. You just need to find the correct terminology for the weapon. ;) This is stated somewhere in a file in the DCS World folder under weapons and tables, need to take a closer look, when I find a quiet moment.
-
I corrected a little error in the 9-line brief (target altitude was the one of the marker, not of the target) and added the possibility to mark ships as targets for the F-16s. Changed version in 1st post.
-
Because I was asked several times for an example mission I now had the chance to attach an example below. Disregard: I cannot attache the same file twice, but you can find the file here: http://forums.eagle.ru/showthread.php?t=110915
-
This my latest attempt to script the possibility for the player to call in AI strikers and give them a target. This script tries to simulate the AFAC role with player as AFAC and AI as strikepackage. The player uses the F-10 menu to define an IP "Tango" and call in a 2 ship of either F/A-18C with MK82 or F-16C with GBU10 or two Tornado ECR with 2 HARMs each. The AI authenticates via textmessages only the AFAC player can read and establishes communication with the player. So I tried simulate the whole procedure for a 9-line brief by the player for the AI. At the moment the AI reaches the IP Tango, the player has to mark the target for the AI with WilliePete rockets and briefs the AI a 9line via text messages. The AI then runs in and either bombs the closest unit found at the mark in 300m distance or just drops on the mark if no unit was found. Be adviced the F-16s can only bomb units and will not drop if the marker rocket was not placed 300m close to unit. Only the F/A-18C can bomb on the mark with dumb bombs (therefore can be used against statics). The F/A-18s will only do one pass, the F-16C shall do 2 passes. The SEAD Tornados will orbit at IP Tango and engage active RADAR in the area on own discretion. As soon as a SAM is launched in a radius of 50nm around the IP Tango, they will call out the SAM launch via text message actively engage the RADAR. It works best if the player defines the IP Tango about 10nm away from his intended target area. Therefore you have to call in the striker earlier. They will orbit at the IP until the player marks a target. Please note that you can only have one strike package active, but you can cancel the current striker mission with the Radio F-10 menu. You can also ask for the current position of the striker via the F-10 menu and abort the attack if necessay, also via the F-10 menu. What you need to do with you mission to get the script working: 1. Initiate MIST > 2.0 on the trigger page in the bottom mask. 2. Initiate the script file with a tigger ONCE->TIME MORE(2) ->LOAD SCRIPT FILE(....) 3.Put a trigger zone on the map in the ME, called "strikerspawnzone". This is the area were the strikepackages will randomly spawn in the air (to simulate their holding area) 4.The AFAC units need the "WilliePete" Rockets (WP), without these rockets you cannot assign targets 5.The AFAC units need to be named "Misty11"as you can see when you open the script file. You can also edit the script file accordingly. NOTE: - I didn´t test it in MP, since versiton 4 only one pilot can be AFAC - The max. number of strike and SEAD flights available to the AFAC can be limited in the script in line 12-14 (default 4 F-16, 2 F/A-18 and 2 Tornado flights) - This script only works for blue AFAC with WP. - This is the 4nd release version, please report bugs, hints, corrections, etc. - Attached is a Miz.file as example (this file also contains an example of the "random airftraffic script" only because some asked for an example and so I put it in also) - last version (r4) with DCS 1.2.10 test_afac.miz MIST20_AFAC_r4.lua MIST20_AFAC_r4_1.lua
-
Maybe yes, maybe no, Maybe rain, maybe snow... How I love this EDlogy you adopted there ... sounds just like my daily job... :music_whistling: :pilotfly:
-
You might want to try this one, if you want some traffic at certain airports: http://forums.eagle.ru/showpost.php?p=1789535&postcount=1 It has no ATC, but all kinds of AI planes and helis schuttling between 3 defined airfields.
-
Jepp, thanks for the very intersting insights...
-
Did you open the mission in the ME and saved it under a different name? That usually helped with the other updates in the years ahead... at least after finding all the triggers which were lost during update...
-
Interesting. I don´t think it is too complicated for someone familar with programming and LUA, well, 2 things I am not.
-
It will only acount the last bomb dropped if you drop 2 bombes separatly, because it will overwrite the shot-event. You could try to add a kind of counter to the event-function and asign seperate track functions to each bomb/ counter, but the message would overlap, so you would than need other functions to delay the messages and so on... You can calculate an average of bombs dropped during a certain period, or get the one closest to the mark, but than you have to define the period time to consider... Well, don´t know if that is all worth the effort..
-
Sounds good, so I can add the Huey WPs to my AFAC script. What I ve got so far you can see below, but note this is WIP, with the F/A-18C it works, still have to finish the text messages and work around the flow, but basically the main functions, which track the WPs and replace them by trigger smokes and let the AI drop on the marks work fine. Maybe you find some piece useful. PS: I will post the script again, when I finished it... some day... A10AFAC_v6.lua
-
Nice! I also worked on an AFAC script combined with the F-10 menu, but for the A-10C. The A-10C AFA C can call in AI striker, give them an IP and after putting a mark with the WilliePete Rockets the AI flight will bomb the area where the smoke marker hit the ground. Combined with the 9 line text messages. Due to the fact that the smoke frome the WPs is not as visible as the trigger smoke, I destroy the WP before it explodes and put a trigger smoke on the position, where the WP hit the ground. I started the script some time ago, but could not finish it, yet due to lack of spare time, but maybe we can combine these 2 variants. Can the Huey also use some sort of WilliePetes or MarkerdRockets? So then I can integrate your variant in the A-10C AFAC script or ortherwise.
-
I see you fellows are applying the script, due to real life I have little time available for scripting at the moment, but I guess you get along... ;) For an output in feet, you can simplifiy this by using: trigger.action.outText("Distance off: "..string.format(BombOffsetInt) .. "ft / Off left "..string.format(xOffsetRelAbs) .. "ft / Too short by "..string.format(zOffsetRelAbs).."ft", 10) and local xOffset = (BombDummyPos.x - Aimpointposx)*3.28084 local zOffset = (BombDummyPos.z - Aimpointposz)*3.28084 But I think there is also a MIST Function which converts feet to meter or otherwise. Don´t know what the "1.8" mentioned above is supposed to do though?
-
Simplest approach could be just to load the script several times, with the different names of each client-units. So you change "player1" to "player2"... and assigne it the name of the client-unit name. Sure there are better ways, like f.e.: player1 = 'test1' -- playerunitname player2 = 'test2' player3 = 'test3' player4 = 'test4' player5 = 'test5' player6 = 'test6' player7 = 'test7' player8 = 'test8' player9 = 'test9' player10 = 'tes10' function SpawnSmokegreen(PlayerUnit) local _player = Unit.getByName(PlayerUnit) local _smokepos = _player:getPosition().p trigger.action.smoke({x=_smokepos.x + math.random(5,10), y= land.getHeight({x = _smokepos.x, y = _smokepos.z}), z=_smokepos.z + math.random(5,10)}, trigger.smokeColor.Green) end function SpawnSmokered(PlayerUnit) local _player = Unit.getByName(PlayerUnit) local _smokepos = _player:getPosition().p trigger.action.smoke({x=_smokepos.x + math.random(5,10), y= land.getHeight({x = _smokepos.x, y = _smokepos.z}), z=_smokepos.z + math.random(5,10)}, trigger.smokeColor.Red) end function SpawnSmokeblue(PlayerUnit) local _player = Unit.getByName(PlayerUnit) local _smokepos = _player:getPosition().p trigger.action.smoke({x=_smokepos.x + math.random(5,10), y= land.getHeight({x = _smokepos.x, y = _smokepos.z}), z=_smokepos.z + math.random(5,10)}, trigger.smokeColor.Blue) end F10RadioAddTable = {} function SmokeDropper(PlayerUnit) if F10RadioAddTable[PlayerUnit] == nil then local _player = Unit.getByName(PlayerUnit) if _player == nil then return end local _playergroup = _player:getGroup() if _playergroup == nil then return end missionCommands.addCommandForGroup(_playerid, "Drop green smoke", nil, SpawnSmokegreen, PlayerUnit) missionCommands.addCommandForGroup(_playerid, "Drop red smoke", nil, SpawnSmokered, PlayerUnit) missionCommands.addCommandForGroup(_playerid, "Drop blue smoke", nil, SpawnSmokeblue, PlayerUnit) F10RadioAddTable[PlayerUnit] = true end end function AddSmokeDropCommands(arg, time) SmokeDropper(player1) SmokeDropper(player2) SmokeDropper(player3) SmokeDropper(player4) SmokeDropper(player5) SmokeDropper(player6) SmokeDropper(player7) SmokeDropper(player8) SmokeDropper(player9) SmokeDropper(player10) return time + 5 end timer.scheduleFunction(AddSmokeDropCommands, nil, timer.getTime() + 5) But I don´t know if it works.
-
Naja, du machst aus der gelenkten eine ungelenkte Bombe. Wenn das Ziel sich nicht rührt und kein Wind da ist, kann man auch mit der treffen. :smilewink: