Jump to content

AKA_Clutter

Members
  • Posts

    583
  • Joined

  • Last visited

Everything posted by AKA_Clutter

  1. Works like a charm now. And it makes sense. With them at the bottom of the file, it would treat the line as an axes. Thanks!
  2. Hi all, I am trying to get this to work and am having some trouble. I have added the above line to both the DCS Install folder\mods\aircraft\F-16c\input\joystick\default.lua and the DCS Install folder\mods\aircraft\F-16c\input\keyboard\default.lua files. It shows up int the control setup as an assignable keyboard command but it doesn't show up as an assignable joystick/throttle command. I also tried adding it to just the joystick dafault.lua file, but that didn't work either. I added the command at the bottom of the file, just before the end of rile/return. Any idea of what I'm doing wrong?
  3. @PravusJSB Thanks for the short primer. Not sure that "tables" will ever be easy for me, but I'll keep plugging
  4. Any more news on this. Waiting "two more weeks" is hard.
  5. Cfrag, Thanks so MUCH! This explains a LOT and tells me what I need to do. I am just getting my toes wet with tables. I don't understand "for pairs" and for ipairs" in arrays with multi rows and columns, but I haven't HAD to use that yet. I do use one table that is an "array" of sorts. It has 30 rows (one for each group I want to spawn) and 13 columns for each row that contain various prices of data. If I understand the above correctly, I should be able to do what you point out by simply revising the line in the for loop from timer.scheduleFunction(F_ACTIVATE_LAG, i, timer.getTime() + GRP_Spawn_TSS*60) to LAG_TBL[i][14] = timer.scheduleFunction(F_ACTIVATE_LAG, i, timer.getTime() + GRP_Spawn_TSS*60) Thanks again for the quick response. Clutter
  6. Hi all, OK, I have a long winded, multifaceted question. I am using the base DCS api, and how no doubt there are better ways of doing. However, I am trying to learn the API and Lus. My questions are more about the DCS API, how it works, and that one can do in lua. I have developed a script to spawn up to 10 la te activation air CAP groups, with each group having a different probability of spawning and a different start time. I just a for loop to iterate through these 10 groups and then use the timer.scheduleFunction() to schedule the different groups. At some point, I may want to use the timer.removeFunction (number functionid) function to remove one or move of the timer.scheduleFunction() set by the for loop. From the Hoggit wiki page, it has the timer.scheduleFunction() set up as “local id = timer.scheduleFunction()” This generates SO many questions for me, I hope these make sense. 1. For the case where I run through the for loop to generate different timer.scheduleFunctions, do they have function IDs? If so how do I get the function ID? 2. Is the “functionid” a number or name? The wiki description seems to indicate a number, but that isn’t a proper lua name. 3. Assuming it is a proper lua name, is there a way to change the functionid/name as you iterate through the for loop. For example, the first time through the loop the timer.scheduleFunction has an id fo F_01, then second time the fuctionid is F_02 I hope those question make sense. I have attached a snippet of the script for illustration of what I am doing, and what generated the above questions. INDEX_TBL contains the starting index and the ending index of the groups to be spawned. That way I can easily change if it spawns 5 groups or 10 groups. PS Let me know if this isn’t in the correct forum section. --[[ ================================================================= function Spawn_LAG. - receives six inputts. These are: i Increment value from the main "for loop" that calls this function. Group_Name, LAG_TBL[1][1] Group_Prob, LAG_TBL[1][2] Group_Time LAG_TBL[1][3] Group_Time_Window LAG_TBL[1][4] Group_Num_Prob, LAG_TBL[1][5] Call timer.scheduleFunction for each gropu to be activated./ Check the group name for nil values. ================================================================= --]] function Spawn_LAG (i, Group_Name, Group_Prob, Group_Time, Group_Time_Window, Group_Num_Prob) local Current_Group = Group.getByName(Group_Name) if (Current_Group ~= nil) then local GRP_Size_Org = Current_Group:getSize() -- Determines how many are in the current group local Group_Prob_Test = math.floor(math.random()*1000)/1000 -- determines grop test proabaility to three decimal places, mainly for printing local TSS_Modifier, GRP_Spawn_TSS = fGRP_Spawn_TSS(Group_Time, Group_Time_Window) -- Calls function to determiene the Spawn tiume based on a base time and a time window LAG_TBL[i][9] = TSS_Modifier LAG_TBL[i][12] = GRP_Spawn_TSS LAG_TBL[i][6] = GRP_Size_Org LAG_TBL[i][7] = Group_Prob_Test if (Group_Prob_Test <= Group_Prob) then LAG_TBL[i][8] = "Yes" timer.scheduleFunction(F_ACTIVATE_LAG, i, timer.getTime() + GRP_Spawn_TSS*60) -- Activate Enemy CAP flight group. timer.scheduleFunction(Adjust_Num_Units_In_Group, i, timer.getTime() + GRP_Spawn_TSS + 2) -- Line to adjust units in A2A_LAG group based on a given probability else LAG_TBL[i][8] = " No" end end end -- End of function Spawn_LAG --[[ ================================================================= Main LAG Spawn loop ================================================================= --]] function LAG_Activation (Index_TBL) for i = Index_TBL [1], Index_TBL[2] do LAG_Spawn = Spawn_LAG (i,LAG_TBL[i][1], LAG_TBL[i][2], LAG_TBL[i][3],LAG_TBL[i][4],LAG_TBL[i][5]) end return end
  7. HI, As the title states, I am wondering if there is an easy way to check and see if a late activation unit has been activated via scripting, and not using MOOSE. I know I could probably add flags, or check the units speed, but am wondering if there is a simpler, more direct way. Thanks. Clutter
  8. Hi Wrecking Crew. Sorry for the late reply. Thanks for sharing. I worked up something based on Grimes reply and it seems to work, but doesn't seem to be as elegant as yours. I will look at yours as it does a lot more than mine, and I know I can learn some lua in doing so. Thanks again. Clutter
  9. Hi all, Is there a list of the names for all the different aircraft (mainly interested in flyable aircraft) that you get from Unit.getTypeName ()? I am interested in trying to sort the active aircraft into 2 or three groups (i.e., A2A and A2G). Thanks, Clutter
  10. Nice to see she's still alive.
  11. Thanks again for this. Gives me something to pick apart and learn from.
  12. Thanks a lot for the FAST response!!
  13. Hi, I trying to do something simple to get the number of clients. I found the following MIST command mist.getUnitsbyAttribute(). Per the description on the Hoggit page, list = mist.getUnitsByAttribute({skill = 'Clients', coalition = "blue"}, 2, true) should return a list of client IDs in the blue coalition. I think this is a table, and the I use the "#table" to get the count of clients. Or at least that is my thought. I have tried this (simple MP mission with just me in it) with the following script and it just returns "0". I do load MIST first and then run this 10 seconds and 30 sconds after the mission starts. -- Simple test using MIST to get number of clients local list = mist.getUnitsByAttribute({skill = 'Clients', coalition = "blue"}, 2, true) local Num_Clients = #list trigger.action.outTextForCoalition(2,"The current number of clients are: " .. Num_Clients, 15) -- Output snumber of clients What ALL am I missing? Do I need have MIST generate a table first?
  14. Hi, I have several TARGET fcf files/profiles scattered around in different folders/directories. I would like to consolidate in one directory. However, if I just move it to a different location, it isn't seen. Also if I move it back it isn't seen. Does anyone know how to move these files around?
  15. Looking forward to this. Great Utility that I have used for years (6?)
  16. LOL Like most things in life ... ... "Your mileage may vary!"
  17. That seems strange, but worth a try. Where did you turn off hyperthreading? BIOS or somewhere else?
  18. All good information. Always learning. I know that either the CPU or GPU will be the bottleneck, one has to be. I guess what surprised me the first run was no FPS increase, and with the GPU at the max, I don't think I will gain anything on the setting side. Time will tell if I did actually gain anything in fps. And as someone said, not all can afford a new GPU. I am (was?) thinking of upgrading my system to a 13 gen CPU/Mb/ram but gains are uncertain. Again, thanks for all the good information.
  19. COMMUNICATION isn't "hype" or it shouldn't be taken that way, or made into hype. Communication should be the best know information at that time. People should understand that, and understand that things change. My two cents worth.
  20. Any idea why? I thought the VRAM might be a thing, but with you having a 4090, that isn't it.
  21. OK, I have just done a few test, but the results don't make sense to me. Looking for conformation that they are correct, and some explanation, or what I might have wrong. First test indicated little improvement in fps, but some in consistency. Second test indicated about a 10 - 12 fps increase (from 30 - 39 fps to 42 - 51 fps). Does MT require/use "learning"? What doesn't make sense to me is that in both cases it says I am GPU bound. My system is a i7 8700K (6 cores/12 threads), 3080 GPU (10 GB VRAM), 64 GB 3600 DDR$, HP Reverb G2 and DCS on a SSD. With a 3080 GPU and a i7 8700K I don't see how this would be GPPU bound. What am I missing?
  22. Mine did that. I Ran it once with the non-MT shortcut and that left the WRM portal open. I then went to the bin-mt directory and launched the DCS EXE from there and it opened fine. I then copied my DCS non-MT shortcut and edited to add the -MT. So far that has worked. It seems like there is a "learning" process with MT. I have no clue if that make sense.
×
×
  • Create New...