-
Posts
68 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by Qazplm
-
''' 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.
-
Functions of the Unit.get * class return nil
Qazplm replied to Qazplm's topic in Scripting Tips, Tricks & Issues
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? -
[ISSUE] "TransmitMessage" command via LUA script.
Qazplm replied to cerious1409's topic in Scripting Tips, Tricks & Issues
Is there a mandatory requirement for where this audio file should be placed? -
Functions of the Unit.get * class return nil
Qazplm replied to Qazplm's topic in Scripting Tips, Tricks & Issues
Yes, I think I must have confused "unit" with "group" -
Functions of the Unit.get * class return nil
Qazplm replied to Qazplm's topic in Scripting Tips, Tricks & Issues
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. -
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,
-
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?
- 4173 replies
-
- mbot
- dynamic campaign
-
(and 1 more)
Tagged with:
-
Thank you. Is this function a function of DCS? Or is it from MIST or MOOSE?
- 4173 replies
-
- mbot
- dynamic campaign
-
(and 1 more)
Tagged with:
-
Hi, hello! Where is the function AddFileTriggerTempo obtained? Can it be used directly in the task script?
- 4173 replies
-
- mbot
- dynamic campaign
-
(and 1 more)
Tagged with:
-
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
-
文 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
-
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.
-
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
-
Cockpit configuration automation
Qazplm replied to Orca57's topic in Scripting Tips, Tricks & Issues
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 -
Cockpit configuration automation
Qazplm replied to Orca57's topic in Scripting Tips, Tricks & Issues
I see. They come from mission in the LUA console. But I don't have a LUA console. How can I obtain these functions? -
Cockpit configuration automation
Qazplm replied to Orca57's topic in Scripting Tips, Tricks & Issues
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 -
Cockpit configuration automation
Qazplm replied to Orca57's topic in Scripting Tips, Tricks & Issues
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! -
Mission Editor questions involving the Kiowa Radios.
Qazplm replied to JohnMclane's topic in DCS: OH-58 Kiowa
ED's reply was to look in the manual, but I didn't find any explanation about the AVIONICS PLUGIN -
Mission Editor questions involving the Kiowa Radios.
Qazplm replied to JohnMclane's topic in DCS: OH-58 Kiowa
Hello, could you tell me X: What does this AVIONICS PLUGIN under the cockpit trigger mean? I couldn't find the answer online -
Mission Editor questions involving the Kiowa Radios.
Qazplm replied to JohnMclane's topic in DCS: OH-58 Kiowa
Thank you, I think I've figured out how to use the indicator, and I'll look into the parameters later。
