Ducku Posted March 23 Posted March 23 Currently the editor has a trigger function to display an image to a specific group of players. The LUA scripting API lacks this function, as it only seems to have outText and outSound functions. By adding the outPicture functions to the LUA API, which i imagine to be a quite trivial task, you enable mission creators to create custom user interfaces for their missions, by periodically updating the picture with something generated by a 3rd party application for example. I think this would unleash a new era of DCS gamemodes for multiplayer servers, and as such it seems like a no-brainer to devote a little development time to this feature. I'm eager to hear other's feedback and ideas on this topic. 4
JesterFlight Posted July 13 Posted July 13 I am absolutely with you and rather dashed to find out this is totally feasible in editor but NOT at my disposal in lua..... like wtf. DEFINATELY needs to be included. And I'm very much with Ducku on how much that would enlighten us as devs! 1
Buta Posted yesterday at 05:11 PM Posted yesterday at 05:11 PM There is an available way. Maybe you have already knew that. You can use net.dostring_in() with a trigger function a_out_picture_*() a_out_picture_*() is what trigger actions in ME belike in script env. You can find doc for all trigger actions descriptions at "[DCS install folder]/DCS World OpenBeta/Doc/DCS User Manual EN.pdf" at Trigger Actions section. e.g. --[[ I'm gonna use: a_out_picture_u(unitID:number, filePath:string, showTime:number, clearview:boolean, startDelayTime:number, horzAlignment:string, vertAlignment:string, size:number, size_units:string) -- args may not correct. You can find all trigger functions and available args(by guess) by creating them in ME and check them in "mission" file in .miz. ]] local picPath = 'imgs/' -- in .miz -> imgs folder for example. local unit = Unit.getByName('testUnit-1-1') if not unit then trigger.action.outText('unit not found.') --Debug info. return end -- You can create multiple triggers in ME to see what those args and numbers means. -- This will display a picture named "testImg" for 10 seconds at the center of the screen with 30% of pic's original size,with no delay for a specific unit. local cmdString = string.format('a_out_picture_u(%d, "%s", %d, %s, %d, "%d", "%d", %d, "%d")',unit:getID(), picPath..'testImg.png',10,'false',0,1,1,30,0) net.dostring_in('mission',cmdString) I have tested it in my multi - player mission and it works as expected. You can show a pic for a unit(AC or Ground unit). For ground unit, you need to take control of this unit in order to see the pic. *You can create multiple triggers in ME to see what those function names, args and numbers belike. But there is not too much useful functions :P.
Recommended Posts