Jump to content

Qazplm

Members
  • Posts

    68
  • Joined

  • Last visited

Everything posted by Qazplm

  1. Thank you. Finally, I'd like to ask, what could be the reason for this? [string"..."] :5: stack overflow
  2. 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?
  3. ''' 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.
  4. 译文 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?
  5. 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!
  6. 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?
  7. Is there a mandatory requirement for where this audio file should be placed?
  8. Yes, I think I must have confused "unit" with "group"
  9. 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.
  10. 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,
  11. 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?
  12. Thank you. Is this function a function of DCS? Or is it from MIST or MOOSE?
  13. Hi, hello! Where is the function AddFileTriggerTempo obtained? Can it be used directly in the task script?
  14. 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
  15. 文 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
  16. 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.
  17. 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
  18. 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
  19. I see. They come from mission in the LUA console. But I don't have a LUA console. How can I obtain these functions?
  20. 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
  21. 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!
  22. ED's reply was to look in the manual, but I didn't find any explanation about the AVIONICS PLUGIN
  23. Hello, could you tell me X: What does this AVIONICS PLUGIN under the cockpit trigger mean? I couldn't find the answer online
  24. Thank you, I think I've figured out how to use the indicator, and I'll look into the parameters later。
×
×
  • Create New...