You have to bear with me as I am new to scripting. My intent is to use edit fields in a dialog to set a position on the map to create a marker using distance and direction.
I plan on using this for a foward obsever / fire control script with artillery or missiles. I have spent some time know getting a handle on dialogs and I have done a few smaller scripts. Nothing fancy. I have the frame work for what I want but i am still inexperienced with scripting.
How I inted this script to work. There will be a foward observer and he can bring up his postion in relation to a register fire gun. (Center formation) in distance and degrees, i.e 327 degrees at 1200 meters. I have completed this part of the script. The fire control officer will then have a simple UI and will have to calculate the fire mission and enter it into the dialog and mark target and or call fire mission. The FO tells the FCO his position from the register fire gun and the distance and direction of the target from is position . The FCO will have to use a little math to determine the direction and distance of the the target. And or have predesignated targets areas to effectively hit the target. I would just like to create a system that has a higher learning curve than clicking on the map.
I have created a dialog, albiet a simple one that has two text fields, two edit fields, two active text fields, and two buttons.
the edit fields are for distance and direction, the two active text fields are to set the text from the edit box to confirm the distance and direction. And one button to close the dialog and one to create the marker. The dialog is fully functional now this is where things get rough for me. I need to be able to take the numerical distance and direction values and use them to create the marker on the map which I will later use to call a fire mission with an artillery or missile script. The first hump is just being able to create the marker. If i can get to that point i should be able to run with it. Now as i understand the forEach command can be used to do this but i am still a bit stumped, over my head. But that is generally how I learn. By biting off more than I can chew.
As I am new to scripting and there doesn't seem to be much comprehensive writing on scripting and what I do find is a bit discobobulated. If anyone can point me to some good referance material that would help me with this task and maybe provide a bit of guidance. It would be much appreciated. I am not asking for anyone to do it for me, I am doing this essentially to learn scripting.
thanks for your time
Jones