Jump to content

Qazplm

Members
  • Posts

    71
  • Joined

  • Last visited

Everything posted by Qazplm

  1. Since it's not recommended, then let's not do it. I think I can now meet my needs based on your suggestions. Thank you! You have been of great help to me. I can now smoothly export the data of the group and regenerate the group with them. There is just one problem: the newly generated group cannot perform the tasks of the original group. I think I completely copied the data of the group.
  2. I think I must have found a way to obtain the data of groups or units. But when I wanted to write to a new file, there was a problem. io.open() couldn't be used. I really don't understand. I won't do it anymore. This has already achieved my goal. Thank you for your help! Thank you!
  3. Thank you. Finally, I'd like to ask, what could be the reason for this? [string"..."] :5: stack overflow
  4. The parameter of the ne.dostring_in() function is a string, and the output is also a string. The parameter of the a_do_script() function is code and the output is a string. Is that what it means?
  5. ''' local GetMoban=[[ function New() local qpa={} for i,k in pairs(mission.coalition.red.country[1].plane.group[2]) do qpa[#qpa+1]=k end return qpa end function ToStringEx(value) if value~=nil then if type(value)=='table' then return TableToStr(value) elseif type(value)=='string' then return "\'"..value.."\'" elseif type(value)=="function" then return "\'这是一个函数\'" else return tostring(value) end end end function TableToStr(t) if t == nil then return "" end local retstr= "{" local i = 1 for key,value in pairs(t) do if type(value) == "function" then key=nil end local signal = "," if i==1 then signal = "" end if key == i then retstr = retstr..signal..ToStringEx(value) else if type(key)=='number' or type(key) == 'string' then retstr = retstr..signal..'['..ToStringEx(key).."]="..ToStringEx(value) else if type(key)=='userdata' then retstr = retstr..signal.."*s"..TableToStr(getmetatable(key)).."*e".."="..ToStringEx(value) else retstr = retstr..signal..key.."="..ToStringEx(value) end end end i = i+1 end retstr = retstr.."}" return retstr end ---- local Templates=New() local TemplateList=TableToStr(Templates) return TemplateList ]] local result, success = net.dostring_in('mission',GetMoban) local TemplateList=loadstring("return"..result)() ''' Is there anything wrong with my writing like this? Find the group list, convert it to a string output, and then convert it to code.
  6. 译文 I just want to obtain the data list or template of the group from mission. But it always fails. However, small lists can be output, such as the position of the target eye. Is it true that net.dostring_in() cannot output very large strings?
  7. Hey, guys, where can I find detailed descriptions of the a_do_script() and net.dostring_in() functions? I've been looking for a long time but still can't find it. Can someone tell me? Thank you!
  8. Hello, buddy. I want to obtain a template for a unit or group, then modify the name and activate it into a new unit. How should I do it?
  9. Is there a mandatory requirement for where this audio file should be placed?
  10. Yes, I think I must have confused "unit" with "group"
  11. Thank you! I want to obtain a data list of a unit or group, which includes its name, mount, task, coordinates, etc. How should it be done? Which function should be used? I didn't find the relevant function.
  12. Hey, guys! When I use this code to obtain the coordinates of a unit, it returns nil. What's the problem here? local tank = Unit.getByName('Tank') local coord= tank:getPoint() trigger.action.smoke(coord,trigger.smokeColor.Blue) The prompt "getPoint" is empty and getName() getLife() getPoint....... thank you,
  13. I don't understand either. It looks as if the function is set to trigger, once, continuously, with condition changes,...... Is it this function? I'm looking for a function that can determine the position after the player clicks the switch through the task script. Can it do it?
  14. Thank you. Is this function a function of DCS? Or is it from MIST or MOOSE?
  15. Hi, hello! Where is the function AddFileTriggerTempo obtained? Can it be used directly in the task script?
  16. Hi, guys! Excuse me. Does anyone know how to monitor the clicking actions of players in the cockpit? Use scripts instead of in the task editor. That is to say, every time a player clicks a switch or a button, an action will be triggered. Or rather, does DCS have a function that can monitor the click actions of users
  17. 文 I can use scripts to read and set cockpit parameters, but I'm not familiar with programming. The scripts I wrote can only determine the current status of the switches and will not be written to make judgments after the player pulls the switches
  18. Thank you. I understand this. What I want to say is how to implement this function with a script. Each time the player pulls the switch, a message is displayed.
  19. I think every time the player pulls down the switch, there will be a message showing the current position of the switch. If I use scripts instead of triggers, what should I do? Can anyone help me? thanks
  20. Hi, guys. I'm not familiar with the script and have a problem. I input return _G.c_argument_in_range(142,0,0.1,"") in the LUA console. It can return true or false, but how should I use it in the script? if net.dostring_in('mission', 'return _G.c_argument_in_range(142,0,0.1,"") ') then trigger.action.outText("very good! Please proceed to the next step" ,10 ) end But it doesn't work
  21. I see. They come from mission in the LUA console. But I don't have a LUA console. How can I obtain these functions?
  22. Thank you for your answer. I already know this. I learned it from you! I mean to ask about this function Where is _G.a_cockpit_perform_clickable_action obtained and where can such functions be found? _G.a_cockpit_perform_clickable_action
  23. Hello, could you tell me these functions _G.a_cockpit_perform_clickable_action(<) device id> , < button id> , < value> Where did ")) get it from? It feels much more convenient than in the ME trigger. Thank you very much!
×
×
  • Create New...