-
Posts
583 -
Joined
-
Last visited
About AKA_Clutter
- Birthday 08/28/1954
Personal Information
-
Flight Simulators
IL-2 1946
DCS World - Most titles
LOMAC/Flaming Cliffs
X-Plane 11
Fly Inside
Falcon $ Allied Force
Falcon 4 Free Falcon 5
Eve
Elite Dangerous -
Location
WA
-
Interests
Sims and Period Ship Modeling
-
Occupation
Engineer
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Coming back to DCS and VR. OpenXR or Steam
AKA_Clutter replied to AKA_Clutter's topic in Virtual Reality
Thanks Sleighzy and Phantom711, I'll pass this information along. -
Coming back to DCS and VR. OpenXR or Steam
AKA_Clutter replied to AKA_Clutter's topic in Virtual Reality
Yeah, I meant OpenXR Toolkit, and I knew it was no longer supported and therefore wasn't sure that was the way to go. His version is NOT the Steam DCS version, but stand alone. I'm pretty sure he is still on Windows 10. For the longest time DCS VR went through Steam VR. And yes it's WMR, SteamWMR, Steam VR IIRC. So would he need to do anything to go though OpenXR runtime? And yes, I sent him a link to this thread. Thanks for the response. -
Hi, I have a friend coming back to DCS and VR. His current setup goes through Steam VR. I know that OpenXR was/(is?) is a thing. With all the changes of late, I've lost track of things. 1) Is OpenXR still the "way to go"? 2) If so, does it need to be installed or has something been integrated into DCS itself? 3) what is the best setup (i7, 9700k, 3080 RTX, HP G2)
-
Anyone running a 3080 and a Pinax Crysta Light
AKA_Clutter replied to AKA_Clutter's topic in Virtual Reality
Thanks for tge information. -
Virtual Reality Loading Screen Question
AKA_Clutter replied to iQyThradz3137i's topic in Virtual Reality
Running intel and a G2 an d I get those from time to time during mission loading. -
Is any running a Crystal Light with a 3080? Just wondering how it works. Thanks in advance
-
If the ship you added start at the start of the mission then it is probably not set to Late Activation. (Screen shot 1 below)> I added a second group of 1 ship to the first trigger (second screen shot) and then added a third ship with a second set of logic (See 3rd screen shot)> I've also uploaded an update mission with three ships. I also added a visual (Green circle) to the f10 map so you can see when the F-16 flies into the activation trigger zone. Hope this helps. Simple Test of Ship Activation_02.miz
-
Shouldn't be. I'll try when I get home later today.
-
Help required for lua scripting
AKA_Clutter replied to Swson's topic in Scripting Tips, Tricks & Issues
Hi Swson, Here are my thoughts. Now I am a newbie to llua, programming in general, and DCS sdripting. With that said, you probably want to use the world.addevent function. The Hoggit Wiki entry that describes this event is: https://wiki.hoggitworld.com/view/DCS_func_addEventHandler And here is my attempt at modify some code I'm using to do what you want. THIS IS NOT TESTED. Good luck and hope this helps. local debugFlagHotLZ = 0 -- Set to 1 to have the debug statement print to screen local checkForEvent = {} function checkForEvent:onEvent(event) local _status, _err = pcall(function(_args) if ((event.id == world.event.S_EVENT_EJECTION and event.initiator ~= nil) or (event.id == world.event.S_EVENT_PILOT_DEAD and event.initiator ~= nil) or (event.id == world.event.S_EVENT_CRASH and event.initiator ~= nil) or (event.id == world.event.S_EVENT_DEAD and event.initiator ~= nil)) then local leftUnit = event.initiator if (debugFlagHotLZ == 1) then trigger.action.outText("leftUnit loop Event ID is = " .. event.id,10 end local playerName = leftUnit:getPlayerName() if (playerName ~= nil) then if (debugFlagHotLZ == 1) then trigger.action.outText(playerName .. "/" .. leftUnit:getName() .. " left " .. leftUnit:getTypeName() .. " or ejected or died",5) end -- ******************* add what you want to do here. *********************************** end end end, _arguments) if (not _status) then env.error(string.format("Helo_Transport: checkForEvent ERROR: %s", _err)) trigger.action.outText("Helo_Transport: checkForEvent ERROR: " .. _err, 10) end end local Event_Check = world.addEventHandler(checkForEvent) -
@cfrag See I told you I was a noob at programming/lua/DCS MSE Thanks once again. Issue 1 Yeap, I wasn't thinking in programing terms in that "=" isn't equal but "assign". programing 101. And I will try other ways to protect against this. As I have it, I could use the group ID in a similar fashion , but that would only work with 1 unit per group. I thought it might be something like this. DCS MSE has many dead-end rabbit holes, or so I have read. Thanks again for the help. Now to go update the script.
-
Hi all, I'm not a programmer and relatively new to lua and DCS MSE. I am not asking for someone to rewrite, or write the script, just point me in a direction, or explain to me why it is doing what it's doing. Als I will attach the full script at the end. At the end of the script is a comment section containing an outline of the script and what I think the flow is. I am trying to write a script that will display a F10Other menu to clients that enter a helo. They can choose one of two options that will give them the bearing and distance to a "hot Landing Zone". I use the scheduleFunction to repeat the message of distance and bearing every 20 seconds. So far I have only tested by myself. It seems to work up until the point I select another aircraft, or if I crash. FIRST ISSUE Once I leave the current unit, or crash, I get an error message about 20-30 seconds later stating the "unit does not exist". What confuses me is right before the line that the scripts crashes, I have a check to see if the unit is nill, if it is nill, then it isn't supposed to execute the line that crashes. I've attached a screenshot showing the error message and the related section of the script. The section of script is local function inFlightDistHead(tempTBL, time) local ourArgument = tempTBL[1] local uObject = tempTBL[2] local landingZone = tempTBL[3] local gID = tempTBL[4] -- add slight delay for multiplayer timing for i = 1, 333333333 do --[[ do nothing ]] end -- Simple error check if uObject == nil then trigger.action.outText(" Sorry, but uint object is nil",15) ourArgument= 1 -- trigger.action.outText("Unit life is ".. uObject:getLife(), 10) -- trigger.action.outTextForGroup(gID,"Inside schedule function ourArgument is " .. ourArgument.. ' and the landing zone is ' .. landingZone .. ' degrees', 10) elseif ourArgument == 53 and timer.getTime() < 1800 then trigger.action.outText("INSIDE LOOP: Unit life is ".. uObject:getLife(),10) -- THIS IS THE LINE TWHERE THE "UNIT DOES NOT EXIST OCCURS local cDistance, cHeading = distanceHeading(uObject, landingZone) trigger.action.outTextForGroup(gID, "Distance to " .. landingZone .. " is " .. cDistance.. ' nm at a heading of ' .. cHeading .. ' degrees', 10) trigger.action.outSoundForCoalition(2 , "shiny-sound-effect.ogg" ) -- Keep going AKA_Message_Output return (time + msgInterval) else -- That's it we're done looping trigger.action.outTextForGroup(gID, '\n===========================\nMaximum time exceeded\nMax time was set to 1800 \n===========================\n', 10) return nil end end -- "end' assocaited iwth inFlightDistHead(tempTBL, time) Now, I tried to get fancy and this function is inside other function that I set up as an overarching function/wrapper. I don't know if that could cause this issue or not due to something being out of scope? SECOND ISSUE I am trying to use the world.eventHandler to see if I can tell when a unit has been exited. I have added S_EVENT_PLAYER_LEFT tas a check, but I don't seem to get that activated when I leave an aircraft. In the section of code below, I DO get the debug message when I crash but not when I just choose a different slot. elseif ((event.id == world.event.S_EVENT_EJECTION and event.initiator ~= nil) or (event.id == world.event.S_EVENT_PILOT_DEAD and event.initiator ~= nil) or (event.id == world.event.S_EVENT_CRASH and event.initiator ~= nil) or (event.id == world.event.S_EVENT_PLAYER_LEFT and event.initiator ~= nil) or -- added to mine, not in Relent's S_EVENT_UNIT_LOST (event.id == world.event.S_EVENT_UNIT_LOST and event.initiator ~= nil) or -- added to mine, not in Relent's S_EVENT_UNIT_LOST (event.id == world.event.S_EVENT_DEAD and event.initiator ~= nil)) then local leftUnit = event.initiator if (debugFlagHotLZ == 1) then trigger.action.outText("leftUnit loop Event ID is = " .. event.id,5) end Thanks in advance for any and all help. null Hot_LZ_Challenge_v0_19.lua
-
Hi @cfrag As usual, I was far less than clear. The function math.atan2(z,x) does work for me just as you explained. It is just not the way I expected based on the lua 5.1 manual. Specifically, the lua manual 5.1 states So based on this I expected the math.atan2 to give the correct answer without the need to determine if it was greater than or less than 360 degrees. Given yours and @Grimes responses, I did what I should have done to start with. I wrote a lua, non-dcs, script to see what it did and if it would give me the correct answer. And it doesn't give me the answers that I thought it would. You still need to determine if it is greater than or less than 360. From this I deduce I can read the manual and time to go post on Stackoverflow and see what I misread. Thanks for the help.
-
@BoomBoom Care to share/expand. We are having trouble with some of our mission that is using a really old script?
-
Hi, Still pretty much a newbie with lua and DCS MSE. I am trying to write a function to get the position of a unit and of a zone, and then determine the distance and heading from the unit to the zone. I have gotten it to work, but though trial and error. I do it though using math.atan2(z,x) and then check to see if I need to add 2Pi to get it the correct quadrant. (check to see if I have a negative degree). As I said the code snippet below works, BUT math.atan2(z,x) doesn't work as advertised. I did read in the Lua 5.3 manual where the atan2 function has been "depreciated" and that math.atan(y, [x]) is supposed to correctly accout for the different quadrants. However, I couldn't get it to work either. My question is am I doing something wrong, or missing something basic? Is this an oddity within DCS? Thanks in advance. local function distanceBearing(uObject, landingZone) -- get coords for zone local lzTbl = trigger.misc.getZone(landingZone) local lzX = lzTbl.point.x local lzZ = lzTbl.point.z local lzY = lzTbl.point.y -- vec3 Object.getPoint(Class Self ) local uPoint = uObject:getPoint() local uPointX = uPoint.x local uPointZ = uPoint.z local uPointY = uPoint.y -- Calcualte delta x and z local dx = lzX - uPointX local dz = lzZ - uPointZ local uDistance = math.sqrt(dz*dz + dx*dx) * m2nm -- calculate bearing local uHeading = math.deg(math.atan2(dz,dx)) if uHeading > 0 then uHeading = uHeading --trigger.action.outText("Bearing 6 to inside if statment (then) " .. uBearing6, 10) else uHeading = math.deg(math.atan2(dz, dx)+2*math.pi) --trigger.action.outText("Bearing 6 to inside if statment (else) " .. uBearing6, 10) end trigger.action.outText("\n====================\n\n Distance and bearing to Hot LZ 1\n\n====================\n ", 10) trigger.action.outText("Distance to Hot_LZ_1: " .. uDistance, 10) trigger.action.outText("Heading to Hot_LZ_1: " .. uHeading, 10) end