-
Posts
1933 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by Wrecking Crew
-
-
On 3/26/2024 at 8:02 AM, Tippis said:
Some of this could probably be fixed by scripting up what is probably what is more often the desired outcome: a specific set of numbers, but in random order, or at least some kind of weighted function where previous results are less likely to reappear. I.e. not random at all in the literal sense, but more appealing to the intuitive sense of what a random pattern should look like.
Hi Tippis, folks. I did this, in my clunky way I have five sets of coordinates and want one set chosen randomly, for the first objective. When the objective is complete, another one can be accepted and the next coordinate set is randomly selected from the remaining four. Rinse and repeat. For the set up, Flag 5 is set to a random value between 1 - 5 at mission start. Then scripting will define a dictionary with values {1, 2, 3, 4, 5}.
Mission Start: Flag 5 set to a random value from 1-5
Mission Start: Create a "F5Dict", and remove the current value of Flag 5 from the dictionary. Flag 5 value determines the coordinate set (one of five) for the objective
-- MS, code.Create F5Dict Flag5Dict = {1,2,3,4,5} do local Flag5Value = trigger.misc.getUserFlag('5') local indexsearch = 0 for index, data in pairs(Flag5Dict) do if (data == Flag5Value) then indexSearch = index end end table.remove(Flag5Dict,indexSearch) end
After the first objective is complete, the player can select to attack a second objective from the remaining four values in the dictionary; Flag 75 goes True, so Switched Condition Do Script..
-- SC, Select Next Killbox, F75T do if #Flag5Dict > 0 then local indexRand = math.ceil(math.random(#Flag5Dict)) trigger.action.setUserFlag(5, Flag5Dict[indexRand]) -- remove the new value table.remove(Flag5Dict,indexRand) end end
Complete the objective. Rinse & repeat.
Credit for the code help goes to Franze
- 1
- 2
-
There is an Action for Smoke Marker On Unit.
-
Wow, blast from the past!
@Mav87th I use a "Latch" flag approach --
--- System Flags ---
--- Latches: do not turn off once set
--- Timers: Use for controlExample --
Flag 50 goes true and is the Latch flag that will never go false again
Flag 506 is the associated Timer flag and can be turned On or Off as needed.
Another tip -- for every mission I have a .lua file with all of the notes, scripts, flag assignments, and events. See the attached.
edit 20240228 -- updated miz file
-
Big aircraft don't do well with Groups of more than 1 Unit. Make the first aircraft with its loadout, waypoints, altitude and speed. Then clone it with Cntrl-c -> Cntrl-v.
Also, a Client (or Player) can be the 1st Unit in a Group that has wingmen (or wingwomen) but not 2nd, 3rd, etc.
-
Perhaps this will help --
--- MS: code.Create & Load Client Tables aircraftClientBlueNames = {} aircraftClientRedNames = {} do local function contains(tbl, val) for _,v in ipairs(tbl) do if v == val then return true end end return false end for uName, uData in pairs(mist.DBs.humansByName) do if(contains({'red'}, uData.coalition)) then if not(contains(aircraftClientRedNames, uName)) then table.insert(aircraftClientRedNames, uName) end end if(contains({'blue'}, uData.coalition)) then if not(contains(aircraftClientBlueNames, uName)) then table.insert(aircraftClientBlueNames, uName) end end end end
-
See the attachment. Someday I'll clean this up
WC's Script & Mist Examples.lua
Much of what is in here came from the help that I got in this forum.
- 2
-
-
Yes, @2circle see this DCS utility -- DCS Updater GUI Utility, by SkateZilla --
-
You tried to use the Message To All Seconds as the repeating interval, but that is not what it is for, it is for the time the message is to be displayed.
A Repeat Message has to be Initiated and then use a Time Since Flag to repeat it.
-
-
-
Here is a way to keep a message up, by repeating it...
-
Here is an example. It's long ...
This is yours --
if trigger.misc.getUserFlag(5),1) == 5 then
is missing a "(" like this Flag((5,1) == 5,,,, but I don't know if that actually works
local msg = {} msg[#msg + 1]='Welcome to the Witches Hollo mission! \n \n' if trigger.misc.getUserFlag('30000') == 0 then -- All Four Objectives Still Alive -- Blue Counter F30000 is False msg[#msg + 1]='Blue must clear out the Witches Hollo of the Red HQ and three Red Camps. See the Briefing for HQ & camp target coordinates. \n \n' msg[#msg + 1]='Use JTAC Hummers to spot targets and laser designate. \n \n' msg[#msg + 1]='Go Blue! \n \n' msg[#msg + 1]='Blue to win: \n' msg[#msg + 1]='Destory the Red HQ and three camps: East Camp, Central, and West. \n \n' msg[#msg + 1]='See the Radio F10 Menu for mission options including Restart. \n \n' end if trigger.misc.getUserFlag('30000') == 1 then -- Three Objectives Still Alive if trigger.misc.getUserFlag('30101') == 0 then -- RDR VGrp01 HQ Alive msg[#msg + 1]='Very nice Blue pilots -- one camp was destroyed. \n \n' msg[#msg + 1]='Finish the mission objectives. Destroy the Red HQ building! \n' else -- RDR VGrp01 HQ Dead FT 30101 msg[#msg + 1]='Very nice Blue pilots -- the Red Headquarters was destroyed! \n \n' msg[#msg + 1]='Finish the mission objectives -- destroy the three Red camps at Witches Hollo. \n' end end if trigger.misc.getUserFlag('30000') == 2 then -- Two Objectives Destroyed, Two Still Alive if trigger.misc.getUserFlag('30101') == 0 and trigger.misc.getUserFlag('33001') == 0 then -- HQ & Central Camp Alive msg[#msg + 1]='Blue pilots -- destroy the Red Headquarters at Witches Hollo! \n \n' msg[#msg + 1]='The Central Red camp is also operational. \n \n' msg[#msg + 1]='Destroy these two targets to finish the mission objectives. \n' end if trigger.misc.getUserFlag('30101') == 0 and trigger.misc.getUserFlag('33101') == 0 then -- HQ & East Camp Alive msg[#msg + 1]='Blue pilots -- destroy the Red Headquarters at Witches Hollo! \n \n' msg[#msg + 1]='The East Red camp is also operational. \n \n' msg[#msg + 1]='Destroy these two targets to finish the mission objectives. \n' end if trigger.misc.getUserFlag('30101') == 0 and trigger.misc.getUserFlag('33201') == 0 then -- HQ & West Camp Alive msg[#msg + 1]='Blue pilots -- destroy the Red Headquarters at Witches Hollo! \n \n' msg[#msg + 1]='The West Red camp is also operational. \n \n' msg[#msg + 1]='Destroy these two targets to finish the mission objectives. \n' end if trigger.misc.getUserFlag('30101') == 1 then -- HQ Plus One Camp Dead msg[#msg + 1]='Very nice Blue pilots -- the Red Headquarters was destroyed! \n \n' msg[#msg + 1]='Finish the mission objectives -- destroy the last two Red camps at Witches Hollo: \n' if trigger.misc.getUserFlag('33001') == 0 then -- Central Camp Alive msg[#msg + 1]=' Central Camp \n' end if trigger.misc.getUserFlag('33101') == 0 then -- East Camp Alive msg[#msg + 1]=' East Camp \n' end if trigger.misc.getUserFlag('33201') == 0 then -- West Camp Alive msg[#msg + 1]=' West Camp \n' end msg[#msg + 1]='\n \n' end end if trigger.misc.getUserFlag('30000') == 3 then -- Three Objectives Destroyed if trigger.misc.getUserFlag('30101') == 0 then -- HQ Alive msg[#msg + 1]='Blue pilots -- the Red Headquarters building is still operatonal. \n \n' msg[#msg + 1]='Destroy this structure to complete the mission objectives and send the red dogs back to Kaspi! \n \n' end if trigger.misc.getUserFlag('33001') == 0 then -- Central Camp Alive msg[#msg + 1]='Blue pilots -- The Central Red camp is still operatonal. \n \n' msg[#msg + 1]='Destroy this fortification to complete the mission objectives! \n \n' end if trigger.misc.getUserFlag('33101') == 0 then -- East Camp Alive msg[#msg + 1]='Blue pilots -- the East Red camp is still operatonal. \n \n' msg[#msg + 1]='Destroy this fortification to complete the mission objectives! \n \n' end if trigger.misc.getUserFlag('33201') == 0 then -- West Camp Alive msg[#msg + 1]='Blue pilots -- the West Red camp is still operatonal. \n \n' msg[#msg + 1]='Destroy this fortification to complete the mission objectives! \n \n' end end if trigger.misc.getUserFlag('30000') > 3 then -- All Objectives Destroyed msg[#msg + 1]='Blue wins today hooray! Fun flying under the clouds. \n \n' msg[#msg + 1]='All mission objectives are met! \n \n' msg[#msg + 1]='Mop up any remaining Red units around Witches Hollo. \n \n' end trigger.action.outText(table.concat(msg), 25)
-
8 hours ago, SickSidewinder9 said:
Or can we make it not break IC somehow?
Yep. Had to turn off IC on the Hollo Pointe server for this
- 1
-
Interesting..
Perhaps you renamed the Unit Name to a value that is now the first in the list? What is the Unit Name?
-
I think Rudel_chw's answer is correct.
I will reply that the mission will start with the first unit that is placed in the mission. When I think about it, I like to have the first unit being a Reaper or a F-117. I don't know how it could be changed once the new mission gets saved.
-
22 hours ago, MadKreator said:
Quick side-track here… Do you like Open Mod Manager better than OVGME?
Yes. I used JSGME way back for rFactor. I tried OVGME but found OMM and chose it because it is up to date. I set up my OMM like this, it took a couple of tries -
C:\Users\..\Saved Games\DCS Mods\DCS Open Beta\Library
And
C:\Users\..\Saved Games\DCS Mods\DCS Open Beta\Backup
- 1
-
On 11/11/2023 at 7:32 PM, MadKreator said:
commenting out this partial section ( line 4 ) DOES remove the MFDS from the Alt-F1 view in the A-10c2. See top of screenshot for full file path. Its in ....MFCD\indicator\BAKE\init.lua
@MadKreator thank you! That took out the MFCDs for my A-10C II. I did comment the whole line. I will try my hand at using Open Mod Manager to apply it. I do appreciate the time you took to figure it out.
One more thing What I really want is to only remove the MFCD from LAlt-F1 when the MFCD knob is turned to Off. That's the way it worked in the original A-10.
edit -- the init.lua change is working perfectly with Open Mod Manager. Thanks again!
- 1
-
On 11/9/2023 at 11:32 PM, lesthegrngo said:
go to DCS > Mods > Aircraft > A10C >Cockpit Scripts > MFCD > Indicator > MFCD_init.lua Make a backup of that file then open the original (edited)
In it you will find a line " purposes = {render_purpose.GENERAL,render_purpose.HUD_ONLY_VIEW} " (edited)
Replace that with " -- purposes = {render_purpose.GENERAL,render_purpose.HUD_ONLY_VIEW} "
Hi, yes, but... I did this ^^^ in the ..>Aircraft>A-10C_2>.., not the A-10 folder. I flew my A-10C II and the MFCDs were still in the LALT-F1 view, for both On and Off. I don't have the A-10C installed.
-
5 hours ago, MadKreator said:
@MAXsenna @lesthegrngo As I responded on discord, You can do this exact same thing in the viewporthandling.lua and it will turn off the in-cockpit mfd’s for every plane ( that I have) except for the a-10. The a-10 must follow a different set of rules that other aircraft.
Hey, thanks for this. So, comment out this one line, only -- ?
-- edit: commenting out this one line only did not remove the A-10C II's MFCDs from LAlt-F1 HUD Only View
render_purpose.HUD_ONLY_VIEW,
16 hours ago, lesthegrngo said:Replace that with " -- purposes = {render_purpose.GENERAL,render_purpose.HUD_ONLY_VIEW} "
save it and try the A10C to see if the MFCD's are still there
And, thank you @lesthegrngo for this. It did not help with my A-10C II. I will try the tip from @MadKreator
- 1
-
Thank you!
-
-
-
Thank you Chunk
Here is another NVG mod from Tacca
This ^^^ one has Noise setting control, and full screen
Unfortunately, it is also not IC compliant
- 1
Unable to Reuse Parking Space for Second Aircraft
in Mission Editor
Posted
Some aircraft have a Takeoff From Ground option. That might help if you have run out of parking spaces.