piXel496 Posted April 6, 2014 Posted April 6, 2014 (edited) Hi wizzards of .lua knowledge, I am not new to scripting, databases and I am used to find reasonably elegant solutions for the "impossible". The DCS mission editor is fine but if I want to create something for MP I am lost in the Mist and .lua's in no time. (even if I try to reproduce what others do in their scripts and read manuals or other shattered info.) Also clientside and serverside I don't understand in the DCS engine. So just to get a grip on how things work simplified. I have the following questions to try to understand the concept. 1. How to retrieve the online player name? (for starters to say clientside "welcome [playerName]") 2. How to make a clientside smoke marker? 3. How to create a unit on the fly with a script serverside? (so you can build it around an event and not with a constant polling trigger with the editor) I'll have a look at mist.Dynamics I would be very happy and I hope others too if someone can answer one or two of the above questions. Thanks in advance! :) . Edited April 7, 2014 by piXel496 simple can be harder than complex old stuff I made
Puddlemonkey Posted April 7, 2014 Posted April 7, 2014 I don't think there is a way of knowing whether a player is the host or a client but I'm not sure that's actually relevant as everything that happens in the world happens to all players. To get players, you can use: array of Unit function coalition.getPlayers(enum coalition.side coalition) coalition coalition identifier returns list of units controlled by players (local and remote) serviceId coalition service identifier To create a smoke marker that is visible to all units, you can use: function trigger.action.smoke(Vec3 point, enum trigger.smokeColor color) creates a smoke marker. point point in 3D space. color color of the smoke. Both are taken from http://wiki.hoggit.us/view/Simulator_Scripting_Engine_Documentation (click Part 1).
piXel496 Posted April 7, 2014 Author Posted April 7, 2014 Very helpful Puddlemonkey I can do something with your info, thx! The reason why I like to script some code clientside is for instance to run triggers, give messages or sounds to a specific player that is not relevant for the other players or the server. And it has a positive effect on serverload aswell. But when it is not possible then we have to live with it. Cheers, . old stuff I made
Recommended Posts