-
Posts
1745 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by toutenglisse
-
I think mostly about SimpleSlotBlocker I don't know its script, but it allows to block/unblock client slots, eventually replacing them with static aircraft if I don't mistake (in your case it could maybe spawn AI aircraft), but I don't have a ready solution/example to your need, it has to be explored. In all ways, if you manage to do what you want using mission editor it will be the best and simplest solution. But there is no straight forward solution to toggle Client/Ai and vice-versa in editor.
-
Hi - you can use : if Unit.getByName('yourUnitName') then (means if the unit is alive then ...) This code line works for Units only, for Groups you must use more conditions, because a dead Group is still True for scripting engine : if (Group.getByName('truck-1') and Group.getByName('truck-1'):getSize() == 0) or not Group.getByName('truck-1') then There are other means/functions for Unit Alive check, like : if Unit.getByName('yourUnitName'):isExist() == true then (isActive, with same way to use code than isExist, is for checking if an existing Unit is active, from "late activation" state, or still unactive)
-
Yes it works well the way you did
-
With only mission editor, using double Units (AI/Client) on the same parking spot is possible, using "start from ground" instead of "start from parking" for the client Unit. Example attached : if client A10A is not under player's control at T=5s, the AI A10A is activated on same spot. (possible issue : if the client A10A gets player's control just after AI A10A is activated : big collision between the 2 - possible with script to solve this by blocking client slot after AI activation, using SimpleSlotBlocker by @Ciribob) Other options are from script and mean much more work. test-AI-replace-unoccupied-client.miz
-
P51s don't stop escort because last escort waypoint of the group they escort is not reached (the groups they escort are themself following 1st bomber group using "big formation", and doing that they are not reaching their own waypoints). For same reason the 2 following bomber groups go to their wpts when "big formation" is over. A lot of unnecessary waypoints causing issues are removed (P51s need first wpt, with escort task, and last wpt, landing / Bomber groups 2 and 3 need only 1 wpt in front of them to avoid an overriding "RTB", "big formation doing everything else). Tasks for Bomber groups 2 and 3 are modified ("carpet bombing" is removed, 1st group of "big formation" has it - it's enough - you can change formation distances to change the "spread" of carpet bombing, and "last wpt" for "Big formation" is removed, for groups to still follow at last orbiting point). bomber_test_mod.miz
-
You can use 0 or 1 as flag value in the switched trigger's conditions there is no issue with that. (But yes, when you set a flag true it automatically gets value 1, and when you set it false it gets value 0. But any value > 0 makes the flag true, not only value 1. A flag with 150 as value is a "true" flag) The issue in your example is that the flag only changes from value 0 to 1 every 5 seconds, and these two values are both valid conditions for trigger (flag 1 value 0 OR flag 1 value 1), so the trigger is always ON and can't get OFF. To work the trigger needs conditions to switch from OFF/false to ON/true. if conditions are always true (or false) there is no switch detected and no actions.
-
If you are not at ease with scripts, an example is better sorry. I attached your example corrected and tried that it works. log test.miz
-
You cannot switch OFF with these settings. The flag can only have value 1 or 0 so it never reach a value that switch the trigger OFF. It is always ON. And as the conditions are true from start the trigger does nothing. For the trigger to work you need to switch from a false condition to a true condition. (example : from any value except 1 or 0 to value 1 or 0)
-
You have to use writePlayerKillTable() when you want it. example trigger once -> Time > X seconds -> Do script text : writePlayerKillTable() (at time = X seconds the file is created containing all Players' kills and you get a message on screen that confirms it - if at least 1 kill has happened)
-
as an example, this code will create a .txt file in your Logs when writePlayerKillTable() function is called. Uses MIST and you need to "comment" two lines (--sanitizeModule('io') and --sanitizeModule('lfs')) in DCS\Scripts\MissionScripting.lua (Table lists Kills made by Players upon any unit with : PlayerNames, TargetNames and time) :
-
on searchObjects: parameter #2 (function) missed
toutenglisse replied to DarK_FeneR996's topic in Mission Editor
Several MEDEVAC scripts already exist, you can have a look at them. Attached is an example with a script I wrote (nothing new, just reinventing a wheel I think). The script works with any (created in mission editor or spawned by script) ejected pilot(s) from any coalition that can be extracted by any transport helicopter of same coalition, AI or player/client, as long as heli has room aboard for them. (uses MIST functions) In example attached a crew of 3 members ejects from a russian Il-78M, and a russian UH-1H AI does land and embark them before RTB. You can run it as is, as spectator, or change Heli from AI to Player/Client to play the Medevac (as player/client you get a F10 MEDEVAC menu with coordinates data for every ejected pilot + possibility to ask for smoke on them, and pilots are removed from menu when rescued. When on land within 500 meters from pilots you can embark them with DCS usual radio "embarking" menu). You can also change the AI Il-78M for a Client aircraft that you control, eject yourself, and then take control of Heli Client to rescue yourself (MEDEVAC task for your previous pilot will be created when he is replaced by a soldier on the ground). test-embark-ejected-pilots.miz -
HOTAS Warthog, how much stick rotation is normal?
toutenglisse replied to PSYKOnz's topic in PC Hardware and Related Software
I also have a very tiny gimbal rotation. Was not there when fresh new. No way to remove it that I know. I always take big care about plastic gimbal when screwing/unscrewing the stick, knowing that I can easily break it this way. What I do is dismount the base so it can freely move, hold tight the grip with right hand, lift a bit the whole and unscrew with left hand with needed force. this way plastic gimbal gets no rotation force at all. Same when screwing the stick back : I screw it until I get just a little resistance, lift the whole thing and finish to screw it tight. -
On a side note, in DCS any AI aircraft can guide laser bombs without any laser source (example : a single M2000c or F5-E AI can attack with LGB - no laser source but the bomb is guided and corrects its trajectory to target).
-
Oui à mon avis c'est ce qu'on voit dans le track. L'ailier essaye de suivre sans chercher à atterrir - il sort son train en dessous de 230knots en réponse à l'alarme mais cherche juste à suivre (puis il le rentre et fait des virages en serpent pour garder de la vitesse tout en suivant), avec un comportement erratique dû aux limites du model de vol AI actuel je pense (corrections parfois violentes et irréalistes). De ce que je sais l'atterrissage en formation n'est possible qu'en multijoueurs - avec des ailiers AI il faut donner l'ordre RTB et ils atterrissent après leur propre circuit. Yes in my opinion this is what we see in the track. The wingman tries to follow without trying to land - he pulls his gear out below 230knots in response to the alarm but just tries to follow (then he retracts it and does snake turns to keep speed while following), with erratic behavior due to the limits of the current AI flight model I think (sometimes violent and unrealistic corrections). From what I know formation landing is only possible in multiplayer - with AI wingmen you have to give the RTB order and they land after their own circuit.
-
I wish 30mm gun shells will be visible on the TADS in Flir mode, flying to impact point, and possible ricochets.
-
The new flight model for A.I. (GFM) is still W.I.P from what I know. Edit : Be sure, when you land, to send RTB order to wingmen, or they'll try to follow you while you are on landing configuration (low&slow), and risk to crash.
-
stop a land unit on waypoints for a few seconds before continuing
toutenglisse replied to Facocero's topic in Mission Editor
It works for me - see axample attached (soldiers hold 30 sec at wpt1 then proceed to wpt 2). Maybe something else is wrong on your side (test with some duration as just stopping in formation takes time ...) test-hold-pos-for-duration.miz -
stop a land unit on waypoints for a few seconds before continuing
toutenglisse replied to Facocero's topic in Mission Editor
Untick 'TIME MORE', and Tick "DUR" and set the duration you want (default is 15 minutes in your screenshot). -
There seems to be a bug with some units !? ... Here an example on caucasus - A10cII player on ground (set VHF to 133.00 at start, then contact JTAC 'on zone in X minutes') and rapier JTAC in the vicinity of a LT-PT76 armored russian unit. The JTAC will respond 'no task available - leave the zone' (approx ^^), meaning he doesn't see unit, while the "FAC attack group" task makes the group visible (wherever he is) and effectively the JTAC does orbit around the unit (seeing it in fact). But if you change the unit for a BTR80 everything is ok (JTAC answers 'be ready to note 9-line (approx ^^) ). test-JTAC-LT-PT76-bug.miz
-
From my experience/understanding, It is not possible, as this unit doesn't have datalink/link 16 (look attributes for kc135 here : DCS-miscScripts/KC-135.lua at master · mrSkortch/DCS-miscScripts · GitHub there is no datalink, while for E-2C(D) here : DCS-miscScripts/E-2C.lua at master · mrSkortch/DCS-miscScripts · GitHub there is datalink). The script you use is incomplete, that's why I found curious that it could work. The right code, for a plane with groupName 'Avion-2' and datalink/link16 as attribute, is : EPLRS = { id = 'EPLRS', params = { value = 1 } } Group.getByName('Avion-2'):getController():setCommand(EPLRS) Here a .miz example (Player F16 on ground in caucasus, to see allied on HSD. E-2C(D) hawkeye with default 'EPLRS on' erased, and activated via script. It appears after 20 sec on HSD, but if you "comment" / -- last line of script (Group.get....) like in picture, it will not appear). On picture of your latest post the tanker appears on HSD because there is an AWACS (or at least on other link16 unit that share tanker). Remove the AWACS and the tanker won't appear. test-script-activate-EPLRS.miz
-
No problem I pm you with the solution. (a script is overriding the mark IDs created in mission editor, replacing them)
-
No they don't disappear until 1) a trigger does erase the mark on purpose, or 2) "read only" is not ticked and someone close the mark using the cross on F10 map. Be sure that "read only" is ticked. (if you still have marks disappearing, post an example .miz where you have the issue)
-
Pleaaase a script enigma needing some hints ;)
toutenglisse replied to dimitriov's topic in Mission Editor
When you dynamically spawn your group/unit (in script of your latest post), you manually give the same ID for group and single unit in group (1001 for example) so groupID or unitID works the same in outTextForGroup function in this case. The modification you made for XLID ("= XL:getGroup():getID()" instead of "= XL:getID()", XL being a unit) was needed for usual cases where IDs are different between group and unit, like @dark_wood wrote. -
How to change heading of a spawned unit via script ? (mist)
toutenglisse replied to winghunter's topic in Mission Editor
heading is only for ground unit. Air spawned aircraft heading is defined by next wpt direction (same as in mission editor).