Forum Jump :

Author Message


Posts: 10
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2014-09-17 01:14        
     
I am looking for a couple things and I haven't had any luck thus far.

First I am trying to find a command that will add or remove support requests. What I am referring to is inside of the support requester module. There is a field for # of possible times that you can request supply drop, artillery, uav etc. I would like to know how to "set" the number of requests or "add" or "remove" a certain # of requests from the module using a trigger (or something else).

Second I am looking for commands to restrict the type of artillery available (restrict to mortars for example) and restrict the possible # of shots fired by a single fire mission request.

There is a way to synchronize/de-synchronize modules mid mission via:
Support_Requester_Module_Name synchronizeObjectsAdd [Unit_Requesting_Support];
I suppose it would be possible to constantly sync and de-sync modules with different #'s of support requests but that would add a lot of overhead and work to a mission.

Any ideas? Any help would be greatly appreciated!


Author Message

Crix  



Posts: 122
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name:

 
#2 Posted at 2014-09-17 12:01        
     
Hey,

you might want to check out these BIS functions:

• BIS_fnc_addSupportLink
• BIS_fnc_limitSupport
• BIS_fnc_removeSupportLink

They can be found in the functions viewer (hit ctrl + F while in the editor) under "Supports".

Crix


Advertisement


Author Message


Posts: 10
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#3 Posted at 2014-09-17 22:28        
     
Okay I took a look but I unfortunately don't have the knowledge to understand exactly what is happening here. This is what the function spits out:


/*
Author: Josef Zemanek

Description:
Limits support runs during a mission.

Parameter(s):
_this select 0: OBJECT - Requester module
_this select 1: STRING - Support type:
"Artillery"
"Transport"
"CAS_Heli"
"CAS_Bombing"
"Drop"
_this select 2: NUMBER - Support run limit
-1: Unlimited

Returns:
nothing
*/

_requester = [_this, 0, objNull, [objNull]] call BIS_fnc_param;
_suppType = [_this, 1, "", [""]] call BIS_fnc_param;
_limit = [_this, 2, -1, [-1]] call BIS_fnc_param;

if (_limit < 0) then {_limit = 10e10};

_requester setVariable [format ["BIS_SUPP_limit_%1", _suppType], _limit, TRUE];

BIS_supp_refresh = TRUE; publicVariable "BIS_supp_refresh";

TRUE;


So I've set up a test scenario with one man "Man1" synced with a support requester module "Mod1". Man1 has _nul = [] execVM "script.sqf" in his init. Here is what I've attempted.

_requester = [_this, 0, Mod1, [Man1]] call BIS_fnc_param;
_suppType = [_this, 1, "Artillery", [""]] call BIS_fnc_param;
_limit = [_this, 2, -1, [-1]] call BIS_fnc_param;


My thinking is that man1 who is snyched to mod1 should be able to call in any type of artillery support an infinite ammount of times. Can anyone spot what I am doing wrong here?


Author Message

Crix  



Posts: 122
Rank:


Level: Member

Country: de
Location:
Occupation:
Age:
In-game name:

 
#4 Posted at 2014-09-17 23:26        
     
Okay,

here is is how it works. (Probably)

First you have to create a requester module in the editor and set it up as usual. (Synching requesters and providers etc.). Call this module "myRequester1" (no quotations) and set the support limit to 0.
To add unlimited Artillery Support - at some point of your mission - you would first (eg.) create a trigger with a condition (eg. !alive hunter1).

Then into your trigger on Activation field add.:
[myRequester1, "Artillery", -1] call BIS_fnc_limitSupport;

In theory, once hunter1 gets destroyed you should be able to call in artillery support for an unlimited amount if times.

Unfortinatly I have no access to ArmA right now, so this is untested but if it fails I'll check it out tomorrow.

This post was edited by Crix (2014-09-18 09:14, ago)


Author Message


Posts: 10
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#5 Posted at 2014-09-19 03:23        
     
That works great!

Thanks for the help. I clearly made that way harder than it had to be.