Jump to content
Sign in to follow this  
rexehuk

ARMA 2 - Script Request Thread

Recommended Posts

This thread has been made to fill in a gap. While there is a place to request addons, there is not one to allow users to ask for script ideas to become a reality.

Use this thread to POST script ideas that you have in mind, but perhaps don't have the capability to produce them alone.

The more information you can provide the better, as a template the following would be good to know.

- Type of script

- Short summary defining the script and what it's meant to achieve.

- Extended explanation of what FEATURES you'd like to see and possible WAYS of implementing them.

I also think people who propose ideas should have some kudos in the final product, depending on their involvement of course.

**Request for sticky if enough people support this idea **

Share this post


Link to post
Share on other sites
**Request for sticky if enough people support this idea **

+1... Would be a useful thread

Share this post


Link to post
Share on other sites

I need help on a script (hopefully just one) that will take input from my dialog and show pilots of a specific side that a CASEVAC is needed and where it is required.

I have it so that the coordinates are entered in 8 digit references and some other info is shown. Can anyone help?

Thanks in advance, and no problem if you can't.

Share this post


Link to post
Share on other sites
will take input from my dialog

You should include your dialog showing the output otherwise people would have absolutely no idea what you're trying to do. Extensive details are required if you expect a customized example. :)

Share this post


Link to post
Share on other sites
I need help on a script (hopefully just one) that will take input from my dialog and show pilots of a specific side that a CASEVAC is needed and where it is required.

I have it so that the coordinates are entered in 8 digit references and some other info is shown. Can anyone help?

Thanks in advance, and no problem if you can't.

Coincides with a project I'm running at the moment... FAC control mod with the ability to send CAS and CASVAC 9 lines to air units.

Picture: http://img20.imageshack.us/img20/720/arma2oa2010120821511591.jpg

Quite a lot of work to do though. That is the beginnings of bringing the interface to the actual unit, the black on green text is just a place holder but meant to resemble this unit - http://www.gd-itronix.com/index.cfm?page=Products:gd300

Will tie into ACRE radios to allow 9 line capability and later (hopefully) a modelled TIGR system.

If you want to get the information OUT of the dialog from a text box, i'll give you my code:

_line1Txt = (ctrlText 13201);

_line2Txt = (ctrlText 13202);

_line3Txt = (ctrlText 13203);

_line4Txt = (ctrlText 13204);

_line5Txt = (ctrlText 13205);

_line6Txt = (ctrlText 13206);

_line7Txt = (ctrlText 13207);

_line8Txt = (ctrlText 13208);

_line9Txt = (ctrlText 13209);

hint format["Line One: %1, Line Two: %2, Line Three %3, Line Four: %4, Line Five: %5, Line Six: %6, Line Seven: %7, Line Eight: %8, Line Nine: %9", _line1Txt, _line2Txt, _line3Txt, _line4Txt, _line5Txt, _line6Txt, _line7Txt, _line8Txt, _line9Txt];

Obviously ctrlText xxxxx resembles the control number, sending the texts to 9 different variables... this is alpha code so can most likely be tidied up into a nice array :).

If you need anymore help Raptor drop me a PM or something. Most likely can help each other for some mutual benefit as I have not handled data transfer over MP yet, nor come up with a nice method that's expandable.

Edited by rexehuk

Share this post


Link to post
Share on other sites

@Raptor 6 Actual:

I'm using the following when players enters a grid number (both 6 and 8 digit supported) during call for fires, maybe that will get you somewhere:

Xf_ToGrid8 = {
private ["_pos","_posx","_posy","_array","_tmp","_str"];
_pos = _this;
_str = format ["%1",mapGridPosition _pos];
_posx = toArray format ["%1", round (((_pos select 0) % 100) / 11)] select 0;
_posy = toArray format ["%1", round (((_pos select 1) % 100) / 11)] select 0;
_array = toArray _str;
_tmp = [];
{_tmp set [count _tmp, _x]} forEach [_array select 0, _array select 1, _array select 2, _posx, _array select 3, _array select 4, _array select 5, _posy];
_str = toString _tmp;
_tmp = nil;
_posx = nil;
_posy = nil;
_str
};
Xf_GridStringToPosition = {
private ["_input","_res","_exit","_tocheck"];
_input = _this select 0;
_res = [];
if !(typeName _input in ["STRING"]) exitWith {_res = "Bad grid data due to code error!"; _res};
if (count toArray _input != 6 && count toArray _input != 8) exitWith {_res = "Bad grid data"; _res};
_exit = false;
for "_i" from 0 to (count toArray _input) - 1 do {
	_tocheck = (toArray _input) select _i;
	if !(_tocheck in [48,49,50,51,52,53,54,55,56,57]) exitWith {_exit = true};
};
if (_exit) exitWith {_res = "Bad grid data"; _res};
if (count toArray _input == 6) then {
	_res = [
		10000 * (parseNumber toString [toArray _input select 0]) +
		1000 * (parseNumber toString [toArray _input select 1]) +
		100 * (parseNumber toString [toArray _input select 2]) + 50,
		10000 * (parseNumber toString [toArray _input select 3]) +
		1000 * (parseNumber toString [toArray _input select 4]) +
		100 * (parseNumber toString [toArray _input select 5]) + 50
	];
} else {
	_res = [
		10000 * (parseNumber toString [toArray _input select 0]) +
		1000 * (parseNumber toString [toArray _input select 1]) +
		100 * (parseNumber toString [toArray _input select 2]) +
		10 * (parseNumber toString [toArray _input select 3]) + 5,
		10000 * (parseNumber toString [toArray _input select 4]) +
		1000 * (parseNumber toString [toArray _input select 5]) +
		100 * (parseNumber toString [toArray _input select 6]) +
		10 * (parseNumber toString [toArray _input select 7]) + 5
	];
};
_res
};

It has some basic type checking in it, but it could probably be improved to check that grid isn't out of bounds etc.

Share this post


Link to post
Share on other sites

Thank you both guys.

@Rexehuk- I would love to talk to you more about your 9-Line work.

@CarlGustaffa- Thank you yet again for helping out. One day when you're done with your brain, mind if I borrow it to learn better scripting techniques? I promise to let you have it back :P

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×