Jump to content


ED Beta Testers
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Grimes

  1. Switch Condition> Part of Coalition In Zone> Flag 1 Off and AI Push Task Switch Condition> All of Coalition out of Zone > Flag 1 On If you had it be "AI Push Task" with "Flag 1 off" directly below it the task would immediately end because for a split second the task is active with the stop condition being met. If you moved flag 1 off above it then the stop condition isn't met when the task starts.
  2. On the fire at point task add a stop condition. I used flag 1 is true and when all of coalition is out of zone it sets flag 1 true, which ends the task. It is important that in the task you use to assign the task that you set flag 1 to false before assigning the task. Otherwise the flag is still true when the task starts, so it automatically ends. Other ways you can go about it are to use Group.getByName('groupName'):getController():popTask() to end their active task or toggle group AI on/off as needed.
  3. Hoggit wiki is where I try to keep scripting information up to date: https://wiki.hoggitworld.com/view/Simulator_Scripting_Engine_Documentation
  4. Yeah that won't work at all. trigger.action.setUserFlag is a function within DCS and you can't and shouldn't try to redefine it, which is what you were doing with it. To call it you just do: trigger.action.setUserFlag(AlphaFOB, 1) However AlphaFOB isn't actually declared in your code anywhere, so it sees it as trigger.action.setUserFlag(nil, 1), which would fail or just do nothing. Probably what you were thinking it should be is something like this, but it also has problems: function decreaseAlphaTickets() while(AlphaFOBTickets > 0)do trigger.action.outText("Alpha FOB Tickets =", AlphaFOBTickets) AlphaFOBTickets = AlphaFOBTickets-1 end end You would have to call that function somewhere for that code to run. Make some trigger that is Repetitive> Time More than 5 seconds> Do script: decreaseAlphaTickets() There are two main problems: 1. It is basically going to decrease all of the tickets instantly the moment it is called. Any loop call like "while condition do" will iterate until the condition is met. Sometimes this can result in an infinite loop, but in this case it'll just count down from 500 to 0 in milliseconds. You should remove the while loop. Either call decreaseAlphaTickets() within a trigger as stated above or use timer.scheduleFunction to constantly set it to occur again. 2. Your outText function is not formatted correctly and it will error. trigger.action.outText("Alpha FOB Tickets = " .. AlphaFOBTickets, 20) would be the correct format if you wanted to display it for 20 seconds. Commas separate input values while .. will combine strings. Though depending on how often tickets decrease you will end up with a wall of messages.
  5. It is a known issue. They can use the KD-63.
  6. Tried to further explain on the wiki https://wiki.hoggitworld.com/view/DCS_editor_AITasking#Perform_Task_vs_Enroute_Task and https://wiki.hoggitworld.com/view/DCS_editor_FAQ#Why_do_AI_aircraft_keep_attacking_before_I_want_them_to.3F. Any suggestions to improve are welcome since it is a wiki and I can edit it more easily. To answer your question you will want to have the Tanker task execute first and then the Orbit task. Really anything you want that tanker to do first should be done before the Orbit.
  7. Checking if any of the units have stopped moving or on the ground and then deactivating the group.
  8. If you had the DLC campaign installed you effectively had two copies of it. One as a DLC campaign and the other in the Viggen/Campaigns folder. Heatblur effectively purchased the campaign from ED, which is why it went off the store page and as part of the Viggen module itself. You still have it.
  9. The sad but true thing to take away from this that I had a mission open that I was testing scripts out when I saw the thread and replied. In that time I added spaces to a zone name to verify select all in the text box worked how I thought it would. Grabbed dinner, played some RDR2, and sat back down to finish up what I was doing earlier. I forgot I had added the spaces. Took a few attempts to realize I added the spaces earlier, saved it, and forgot all about it.
  10. AI should despawn after 30 minutes of being parked.
  11. There is no native function for trimming in lua. You more or less have to do something like s = string.gsub(s, " ", "") However that isn't really useful when you named the group as something with a space in it because it'll still fail Group.getByName("whatever") when the group is actually named "whatever ". Best sanity check is to click on the group name in the editor and Ctrl+A to select all of the text then copy and paste that into the line that keeps failing. Should at least make it obvious if spaces exist.
  12. Only by manually trying to keep track of things. If you know the value the fuel starts at you can use Unit.getFuel() on take-off events along with Unit.getDesc().fuelMassMax to know the amount of fuel they took off with. Basically multiply Unit.getFuel() by Unit.getDesc().fuelMassMax to get the actual amount they took with and subtract it from the known value. Adding the fuel back in is tricky because you will just have to experiment and work out the conditions for whenever players add resources back in. TBH I haven't messed with it in a while so I don't know the specifics, but it should work when they despawn. If you did it with a landing event it might be close enough, though I think there would be some error involved anyway. Really wish the answer was Warehouse.getByName('whatever'):getFuel() but that doesn't exist.
  13. Admin tools, stats, TK stuff all default to being enabled. If you don't have direct access I would install it locally so you can configure things how you want and then when satisfied send them the files. You can make a batch file that launches your local game as a server and in a new saved games folder. For example I use a batch file in my install folder with just: bin\DCS.exe --server --norender -w DCS.DS_openbeta What this does is it creates a folder in saved games called DCS.DS_openbeta. I can then use the index.html in the "WebGUI" folder in the install to load missions and do whatever is needed. You can launch the game normally and then connect to your own server already running on your own PC. Anyway, use this to figure out the configs you want for slmod.
  14. HB F14A Rioni River Run Time Trial.miz Its just in the F-14 missions folder.
  15. The location of a landing waypoint doesn't actually matter, AI should navigate to where-ever their landing destination is at automatically. That said it looks to be broken for helicopters in general because they won't land on FARPs or airfields with that waypoint type.
  16. Within the miz file itself the values don't match. The editor likely is displaying whatever is in the frequency box for channel 1 of the first radio because by its rules if you change one it will change the other. So it is assuming the value in channel 1 is the value in frequency and for whatever reason isn't showing the actual value in the miz. If you re-save it then it'll rewrite the value in channel 1 to actually be 119. It is the file that is generated by Liberation. Don't know if it just creates some default frequency for each group and any custom radio preset separately or what. The radio checkbox is a group toggle for whether or not that group will broadcast messages over their radio. Set to false you won't hear that group, set to true you will. Just an easy on/off so the user doesn't have to add and set 4 different options for that flight.
  17. It is pretty simple, you need to get the position of the unit, then the height ground level is at that position, and then subtract the difference. If you have the F-14 the "time trial" missions use it to log AGL stats of your aircraft. if Unit.getByName('whatever') then local pos = Unit.getByName('whatever'):getPoint() local agl = pos.y - land.getHeight({x = pos.x, y = pos.z}) -- do whatver you want with agl value end
  18. It might be both SRS and liberation, but probably more liberation. What looks like what is happening is that it isn't use the same value for the group wide frequency setting and whatever is the first frequency in each unit's custom frequency list. SRS is likely using one value and switching to the other as the power gets applied. These two values should be the same. ["Radio"]= { [1]= { ["channels"]= { [1]=123.0, ["frequency"]=119.0,
  19. My guess is it is a modded unit as *US_Soldier isn't a unit in DCS.
  20. Infantry aren't capable of the task.
  21. These were added a long time ago but the syntax only became known recently. But you can draw shapes on the map. Limited to line, arrow, circle, quad, poly, and text. https://wiki.hoggitworld.com/view/DCS_func_markupToAll There is a bug currently with quad where it can fail to shade in the whole shape, but you can see some examples I've made with it.
  22. I think what Exnom is saying is he would like to set custom values for different waypoint inputs that reference the same value. For instance creates "tankerSpeed" and sets it to 400, then when placing any aircraft he could set the speed to be "tankerSpeed" instead of an actual number. If he decided the speed was to fast or to slow he'd adjust where tankerSpeed was defined at and then every waypoint with that assigned value would adjust accordingly.
  • Create New...