Jump to content

Mission for Training the Basics


SGT Coyle

Recommended Posts

Hey Folks,

Looking to make a training mission for pilots that are just starting or restarting after an absence from DCS, or looking for a mission to train on a new module, some basic functionality.

 

So where to start?

 

I'm thinking of a simple Navigation exercise that requires the pilot to use the various navigation aids / devices like CDU(A10C) or CK37(AJS37).

 

When the pilot spawns into the A/C of his choice(I set down all the current module types as clients). I want a welcome brief over the message system and a F10 Radio Option that lets the pilot choose what type of exercise to participate in(for now just simple navigation).

 

 

So my thinking was to place several trigger zones with a 20k radius around the map at varying distances to each other. Generate a random Long/Lat position from each zone and transmit those positions to the pilot to via the message system for he/she to make a flight plan with the various a/c instruments/devices. The idea is to be as flexible as possible from the pilot point of view.

 

So what I'm having trouble getting my head around is:

 

  1. How to generate the positions from the trigger zones (or weather there would be a better way to do it).
  2. How to communicate those positions to the pilot through the message system.

Another question would be, is there a way to list those positions in th epilots knee board?

 

 

Any thoughts or advise would be appreciated. I haven't completely articulated my thoughts about the mission, but thought this would be a good place to start.

 

 

I have a limited grasp on the LUA and scripting in gereal, so any help with that in mind would be helpful.

 

 

Thanks,

Night Ops in the Harrier

IYAOYAS


 
Link to comment
Share on other sites

 

Thanks ESAc_matador,

 

I looked at that and it is a great idea, but what I'm going for is more of a generic open sandbox. I don't intend to have way points or flight plan laid out for the pilot. All mission planning should take place in the cockpit. The destination coordinates will be generated after mission start and given to the pilot, in the form of Lat/Long coordinates, after engine startup prior to request for taxi. Or something like that.

 

Do you have a particular mission, out of the "Interesting Mission Generator", I should look at that does something like what I'm trying to do?

Night Ops in the Harrier

IYAOYAS


 
Link to comment
Share on other sites

Can someone give me an example of how to use the function trigger.misc.getZone?

 

I have a trigger zone named "BNE_WayPoint_1" and I'm trying to use it in the editor with DO Script. and have the return sent as message.

 

local WP1 = trigger.misc.getZone('BNE_WayPoint_1')
trigger.action.outText(WP1)

Night Ops in the Harrier

IYAOYAS


 
Link to comment
Share on other sites

trigger.misc.getZone() returns a table of the trigger zone showing the center of the zone and the radius.

 

So if you used a trigger.action.outText(WP.radius, 20) would return whatever the value for its radius is set to.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

So trigger.misc.getZone returns a table of:

point = Vec3

radius = distance

 

The example you gave with radius worked fine, but what about the point variable? When I use point in place of radius I get an error that crashes the game.

 

So looking more closely at your example I added another "." after the point variable and a variable of Vec3 table. In this case "x". It did indeed give the x position of the Vec3 point of the trigger zone I was working with.

 

So in the "DO Script" text box:

WP1 = trigger.misc.getZone('BNE_WayPoint_1')
trigger.action.outText(WP1.point.x,20)
trigger.action.outText(WP1.point.z,20)
trigger.action.outText(WP1.radius,20)
trigger.action.outText(WP1.point.y,20)

Returns the x and z variables of the Vec3 table, and the y at the end, and the radius line by line.

 

Grimes, thanks for the example. It helped a lot.

 

Now that I have the Vec3 position of my trigger (BNE_WayPoint_1), how do I work that into coordLOtoLL

 

I tried adding:

LL1 = coord.LOtoLL(WP1)
trigger.action.outText(LL1.latitude,20)

But it caused error and crashed game.

 

 

 

 


Edited by SGT Coyle

Night Ops in the Harrier

IYAOYAS


 
Link to comment
Share on other sites

That specific function returns multiple values.

 

local lat, lon = coord.LO.toLL(WP1.point)

trigger.action.outText('Latitude: ' .. lat .. ' ' .. 'Longitude: ' .. lon, 20)

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

local lat, lon = coord.LO.toLL(WP1.point)

 

To many dots. Took me awhile to figure that out. Should be:

local lat, lon = coord.LOtoLL(WP1.point)

That worked afaik. Gave me something unexpected.

 

lat 44.95393565325

lon 35.37807458675

 

So I take it there's going to be some mathematical conversion necessary to get this in the form of Degree/Min/Sec ? LoL

 

...and I'm starting to think this is going to be a Lua file, not just the editor text box.

 

OK, I copy pasted into a .lua and it worked as before.

 

 

I have a limited grasp on the LUA and scripting in gereal, so any help with that in mind would be helpful.

 

 

Thanks,

I thought I had limited grasp on Lua. I actually have no idea. Lol!


Edited by SGT Coyle
I'm and idiot

Night Ops in the Harrier

IYAOYAS


 
Link to comment
Share on other sites

Honestly just use MOOSE - it has prebuilt functions that return lat long translated as North-Easting + MGRS:

 

 local myZone = ZONE:New("ZoneName")
 local coordinates = myZone:GetCoordinate()
 local LatLong = coordinates:ToStringLLDDM()
 local MGRS = coordinates:ToStringMGRS()
 local vec3 = coordinates:GetVec3()
 local X = vec3.z  -- map coordinates are messed up in DCS - the z and x points are your x,y coordinates on a 2d map
 local Y = vec3.x

 

You can find more info about the Coordinate functions available here:

 

http://flightcontrol-master.github.io/MOOSE/Documentation/Point.html#COORDINATE


Edited by Igneous01

Developer of Kaukasus Insurgency - a customizable Dynamic PvE Campaign with cloud hosting and stats tracking. (Alpha)

 

http://kaukasusinsurgency.com/

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...