-
Posts
71 -
Joined
-
Last visited
About Qazplm
- Birthday 10/03/1980
Personal Information
-
Flight Simulators
dcs world:fa18C ka50 fc3
-
Location
china
-
Interests
Flight simulation;Learn
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
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.
-
''' 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?
- 4181 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?
- 4181 replies
-
- mbot
- dynamic campaign
-
(and 1 more)
Tagged with:
