-
Posts
531 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Chump
-
@Elphaba Are you saying that the radio.modulation enum is not working for you? I did a quick test mission using trigger.action.radioTransmission() and it was working for both AM and FM. Are you seeing an error in the dcs.log somewhere regarding this enum? Would you please explain how you are using this, if not similar to what I'm doing? local zone = trigger.misc.getZone("test") trigger.action.radioTransmission("l10n/DEFAULT/test1.ogg", zone.point, radio.modulation.AM, true, 123000000, 100, "testAM") trigger.action.radioTransmission("l10n/DEFAULT/test2.ogg", zone.point, radio.modulation.FM, true, 30000000, 100, "testFM") Both sounds were heard on their respective frequencies (123MHz AM & 30MHz FM) using an A-10CII hot-start on the runway of Batumi and the trigger zone out in the sea a few miles away. Scripting doc about radio enum
-
-
@skypickle You would add your LUA script into the creators table in device_init.lua. Your script would then call the listen_command(), and you would trigger it with an input definition. You can see how it is done by looking at other LUAs that are called from device_init.lua. For example: -- devices.lua devices["newThing"] = counter() -- device_init.lua creators[devices.newThing] = { "avLuaDevice", LockOn_Options.script_path .. "newThing.lua" } -- newThing.lua GetSelf():listen_command(1234) -- default.lua { down = 1234, name = _("My New Thing Command"), category = _("MODS") }, There is a bit more to it like defining the functions/logic that is triggered, but this should get you started.
-
Adding to what @Dragon1-1 said, since it was written as a Chrome plug-in, it will not be a direct port. Although it is possible to trigger LUA with a new key/button press using listen_command(), the next hurdle would be that DCS does not have native voice recognition to generate the input to send to ChatGPT.
-
The encyclopedia says: I'm assuming that it means the BGM-109B Tomahawk, which it pulls the data from [DCS]\MissionEditor\data\scripts\Enc\Weapon\BGM-109B.txt. There is nothing connecting this to it's typeName that I can see in the exposed LUA files. Maybe someone else knows where this link is located?
-
@Bestiajez MiST (https://github.com/mrSkortch/MissionScriptingTools/releases) makes a repetitive scheduled event very simple. You could do something like this inside a ONCE / DO SCRIPT trigger (after adding MiST in a MISSION START/DO SCRIPT FILE trigger beforehand): countdown_num = 60 local function showMsg() trigger.action.outText(tostring(countdown_num), 1) countdown_num = countdown_num - 1 if countdown_num == 0 then countdown_num = nil end end mist.scheduleFunction(showMsg, {}, timer.getTime(), 1, timer.getTime() + 60)
-
There is MARK TO ALL/GROUP/COALITION and REMOVE MARK that can be used in the ME. This would take playing with the triggers, one to draw it when radio command/flag is used, one to wait for a period of time + set a flag, and one to remove the mark when the time is reached/flag is set. If you are interested in doing this in LUA, then you could use trigger.action.markToAll/Group/Coalition and removeMark after a timeout period. You could also use setMarkupColor with RGBA (desired color) then 0,0,0,0 (for transparent alpha) to toggle the visibility of the mark.
-
-
Mission script error with eventhandlers.lua
Chump replied to Skynet99's topic in Scripting Tips, Tricks & Issues
Your event handler is incorrect, and some other errors. Here is a suggestion on how to handle events: local function onPlayerAddMarker(event) local unit = event.initiator if unit and event.id == world.event.S_EVENT_MARK_ADDED then local clientName = unit:getPlayerName() if clientName then -- get some values local coalition = unit:getCoalition() local group = unit:getGroup() local markId = event.idx local markText = event.text local markPosition = event.pos -- do your stuff here end end end local eventHandler = { f = onPlayerAddMarker } function eventHandler:onEvent(e) self.f(e) end world.addEventHandler(eventHandler) -
@Elphaba I can think of a way to associate by airbase ID (it ain't pretty, just a suggestion): local radios = {} dofile(string.format("./Mods/terrains/%s/Radio.lua", env.mission.theatre)) if radio then for _, airbase in ipairs(coalition.getAirbases(coalition.side.BLUE)) do local radioId = string.format("airfield%d_", airbase:getID()) for _, r in ipairs(radio) do if string.find(r.radioId, radioId) then radios[airbase:getTypeName()] = r break end end end end -- now you have a table of associated radio entries by airbase -- ex: radios["Anapa-Vityazevo"].frequency.UHF[2] EDIT: I was originally thinking of Beacons.lua where there are multiple entries per airbase. Since here it is 1:1, it makes the loop easier.
-
Sim ends suddenly without crashing
Chump replied to VR Flight Guy in PJ Pants's topic in Bugs and Problems
Seems like it might be your VR: 2023-02-01 14:42:45.451 INFO VISUALIZER (Main): OpenXR: request exit -
-
GitHub added the extra dot. I will get it fixed up. Thanks!
-
@maajr57 I added a release (https://github.com/chump29/DCS_Mod/releases/tag/Latest) that is in OvGME format for ease of install. Please let me know if you have any questions.
-
Here is the fixed mission for "Lesson 14 - AGM-65 Maverick Training" (see attached). { ["file"] = "Lesson 20 - AGM-65 Maverick.miz", ["name"] = _("Lesson 14 - AGM-65 Maverick Training"), ["description"] = _("In this training you will be presented with four structured tactical scenarios. Each will stress one aspect of AGM-65 employment."), }, Put this in: [DCS Directory]/Mods/aircraft/F-16C/Missions/Training Lesson 20 - AGM-65 Maverick.miz
-
The issue is stemming from an included script in the mission (HitAndCall.lua). if event.id == world.event.S_EVENT_DEAD and event.initiator:getName() == 73729948 then The event does not have an initiator but it is trying to get it's name. @Flappie Are we allowed to fix these issues (and make available) until ED can get to it?