Jump to content
uncookedzebra

Woah Woah Woah BI. Trying to sneak one in?

Recommended Posts

There's a few AI mods that can help up the aggression and challenge of AI.  Some scripts too.  Setting skills higher helps as well, but you often end up with head shots when you least expect them. :)  Might start with this one.

Share this post


Link to post
Share on other sites

Here's an extra icon you can include in your missions, just save it as rings.png or whatever.

 

lpfkPgA.png

  • Like 1

Share this post


Link to post
Share on other sites

Is there a simple way to add a bis_fnc_holdActionAdd to a spawned vehicle on Multiplayer?

Like:

private ["_laptop"];

_laptop = [
["Land_Laptop_unfolded_F",[12064.168,2454.260,0.810],332.572,[0,0,1],true]
];

{
private ["_objectLaptop"];
_objectLaptop = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
if (_x select 4) then {
_objectLaptop setDir (_x select 2);
_objectLaptop setPos (_x select 1);
_objectLaptop allowDamage false;
_objectLaptop enableSimulationGlobal false;

} else {
_objectLaptop setPosATL (_x select 1);
_objectLaptop setVectorDirAndUp (_x select 3);
_objectLaptop allowDamage false;
_objectLaptop enableSimulationGlobal false;
};
} foreach _laptop;

Share this post


Link to post
Share on other sites

My code in this post is designed as a function.  So save that as function.  (Wrap it all in fnc_addStuff = { }; and add it above below your private command in your code.  Then just:

[_objectLaptop] call fnc_addStuff;

along with your allowDamage lines.

  • Like 1

Share this post


Link to post
Share on other sites

My code in this post is designed as a function.  So save that as function.  (Wrap it all in fnc_addStuff = { }; and add it above below your private command in your code.  Then just:

[_objectLaptop] call fnc_addStuff;

along with your allowDamage lines.

 

 

Love you so much for your fast help and reply. I get my hands on that and test this.

Share this post


Link to post
Share on other sites

Tryed that but i still get no option on my Laptop. I called the hole code from a server side pbo.

 

Here is my code now:

private ["_vehicles"];

fnc_addHoldAction = {
[	
	_object,																							// 0 object	
	"Download Files",																					// 1 action title
	"\exile_assets\texture\marker\mission_hardcore_ca.paa",												// 2 idle icon
	"\exile_assets\texture\marker\mission_hardcore_ca.paa",												// 3 progress icon
	"true",																								// 4 condition to show
	"true",																								// 5 condition for action
	{["System", "File download started..."] call BIS_fnc_showSubtitle},									// 6 code executed on start
	{},																									// 7 code executed per tick
	{["System", "File downoad complete!"] call BIS_fnc_showSubtitle; call RG_fnc_pcEvent;},				// 8 code executed on completion
	{["System", "Download failed! Please try again."] call BIS_fnc_showSubtitle},						// 9 code executed on interruption
	["You are a hacker!"],																				// 10 arguments
	5,																									// 11 action duration
	0,																									// 12 priority
	false,																								// 13 remove on completion
	false																								// 14 show unconscious
	] remoteExec ["bis_fnc_holdActionAdd", -2];																// Multiplayer (remoteExec is the new version of BIS_fnc_MP)					
};

_laptop = [
	["Land_Laptop_unfolded_F",[12064.168,2454.260,0.810],332.572,[0,0,1],true]
];

{
	_objectLaptop = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
	_objectLaptop setDir (_x select 2);
	_objectLaptop setPos (_x select 1);
	_objectLaptop allowDamage false;
	_objectLaptop enableSimulationGlobal false;
	[_objectLaptop] call fnc_addHoldAction;
} foreach _laptop;

_vehicles = [
	["Land_CampingTable_F",[12063.847,2453.986,0],330.493,[0,0,1],true]
];

{
	private ["_objectVehicles"];
	_objectVehicles = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
	if (_x select 4) then {
		_objectVehicles setDir (_x select 2);
		_objectVehicles setPos (_x select 1);
		_objectVehicles allowDamage false;
		_objectVehicles enableSimulationGlobal false;
	} else {
		_objectVehicles setPosATL (_x select 1);
		_objectVehicles setVectorDirAndUp (_x select 3);
		_objectVehicles allowDamage false;
		_objectVehicles enableSimulationGlobal false;
	};
} foreach _vehicles; 

Share this post


Link to post
Share on other sites

Change this:

fnc_addHoldAction = {

to this:

fnc_addHoldAction = {
    params ["_object"];

Share this post


Link to post
Share on other sites

Still not working so far i am on that problem the hole day. My code now;

private ["_vehicles"];

fnc_addHoldAction = {
	params ["_object"];
	
[	
	_object,																							// 0 object	
	"Download Files",																					// 1 action title
	"\exile_assets\texture\marker\mission_hardcore_ca.paa",												// 2 idle icon
	"\exile_assets\texture\marker\mission_hardcore_ca.paa",												// 3 progress icon
	"true",																								// 4 condition to show
	"true",																								// 5 condition for action
	{["System", "File download started..."] call BIS_fnc_showSubtitle},									// 6 code executed on start
	{},																									// 7 code executed per tick
	{["System", "File downoad complete!"] call BIS_fnc_showSubtitle; call RG_fnc_pcEvent;},				// 8 code executed on completion
	{["System", "Download failed! Please try again."] call BIS_fnc_showSubtitle},						// 9 code executed on interruption
	["You are a hacker!"],																				// 10 arguments
	5,																									// 11 action duration
	0,																									// 12 priority
	false,																								// 13 remove on completion
	false																								// 14 show unconscious
	] remoteExec ["bis_fnc_holdActionAdd", -2];															// Multiplayer (remoteExec is the new version of BIS_fnc_MP)					
	params ["_object"];
};

_laptop = [
	["Land_Laptop_unfolded_F",[12064.168,2454.260,0.810],332.572,[0,0,1],true]
];

{
	_objectLaptop = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
	_objectLaptop setDir (_x select 2);
	_objectLaptop setPos (_x select 1);
	_objectLaptop allowDamage false;
	_objectLaptop enableSimulationGlobal false;
	[_objectLaptop] call fnc_addHoldAction;
} foreach _laptop;

_vehicles = [
	["Land_CampingTable_F",[12063.847,2453.986,0],330.493,[0,0,1],true]
];

{
	private ["_objectVehicles"];
	_objectVehicles = createVehicle [_x select 0, [0,0,0], [], 0, "CAN_COLLIDE"];
	if (_x select 4) then {
		_objectVehicles setDir (_x select 2);
		_objectVehicles setPos (_x select 1);
		_objectVehicles allowDamage false;
		_objectVehicles enableSimulationGlobal false;
	} else {
		_objectVehicles setPosATL (_x select 1);
		_objectVehicles setVectorDirAndUp (_x select 3);
		_objectVehicles allowDamage false;
		_objectVehicles enableSimulationGlobal false;
	};
} foreach _vehicles;

Here is also the PBO i am using: https://www.dropbox.com/s/a0ct93gbwxruohw/a3_rg.pbo?dl=0

I am very grateful for your help!

Share this post


Link to post
Share on other sites

I'll check it out once I get home, which should have been 30 minutes ago. :)

  • Like 1

Share this post


Link to post
Share on other sites

I'll check it out once I get home, which should have been 30 minutes ago. :)

Thank you very much. Get home safely  ^_^

Share this post


Link to post
Share on other sites

Does anyone know the path to the handcuff icons used in the campaign when untying the Gendarme?

 

EDIT: never mind, found it:

 

"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_unbind_ca.paa"

  • Like 1

Share this post


Link to post
Share on other sites

Anyone found images of the right size for hold-action icons?

Revive icon

"a3\ui_f\data\revive\medikit_ca.paa"
works, obviously.
I've used the waypoint icons so far, they fit, look good and are easy to preview. To get the path to each icon just check CfgWaypoints in the config viewer.

The Search & Destroy icon for instance doubles nicely as a spotting or marking action. Scripted waypoint (Gear) can be used with a lot too.

Share this post


Link to post
Share on other sites

Some icons are bit small for the hold UI though, they end up being upscaled and look low-res. Here are some more that are specifically for the hold action:

 

"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa"

"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_forceRespawn_ca.paa"

"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_revive_ca.paa"

"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_reviveMedic_ca.paa"

"\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_Search_ca.paa"

  • Like 1

Share this post


Link to post
Share on other sites

Here's a ready example for the holdActionAdd function:

 

fn_addHoldAction.sqf

#define TARGET _this
#define TITLE "Downloading Data"
#define    ICON  ""
#define    PROG_ICON    ""
#define COND_ACTION "true"
#define COND_PROGRESS "true"
#define    CODE_START {hint "Downloading data..."}
#define    CODE_TICK {}
#define CODE_END {hint "Data downloaded!"}
#define    CODE_INTERUPT {}
#define    ARGUMENTS []
#define    DURATION 5
#define    PRIORITY 1
#define    REMOVE true
#define SHOW_UNCON false

[TARGET,TITLE,ICON,PROG_ICON,COND_ACTION,COND_PROGRESS,CODE_START,CODE_TICK,CODE_END,CODE_INTERUPT,ARGUMENTS,DURATION,PRIORITY,REMOVE,SHOW_UNCON] call bis_fnc_holdActionAdd;

init line of your object:

_action = this execVM "fn_addHoldAction.sqf";

 

 

 

I thought it would be easier to define the parameters in seperated lines for better legibility

I'm new to this whole scripting thing, is there a way to make it so after i've downloaded the intel a trigger activates?

Share this post


Link to post
Share on other sites

I'm new to this whole scripting thing, is there a way to make it so after i've downloaded the intel a trigger activates?

 

Here's a demo mission that shows that and rescuing a hostage.

Share this post


Link to post
Share on other sites

/*
init field of a phone:

null = this execVM "tickleMe.sqf";

*/
params ["_object"];

[
/* 0 object */				_object,
/* 1 action title */			"Tickle Satphone",
/* 2 idle icon */			"\a3\ui_f_exp_a\Data\RscTitles\RscEGProgress\downloadicon_ca.paa",
/* 3 progress icon */			"\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\upload_ca.paa",
/* 4 condition to show */		"true",
/* 5 condition for action */		"true",
/* 6 code executed on start */		{["Satphone", "That tickles!!"] call BIS_fnc_showSubtitle},
/* 7 code executed per tick */		{hint "Don't stop!"},
/* 8 code executed on completion */	{hint format["%1 tickled a phone!\n\n%3", name (_this select 1), _this select 3 select 0]; player setDamage 0.5;},
/* 9 code executed on interruption */	{["Satphone", "You lazy bum!"] call BIS_fnc_showSubtitle},
/* 10 arguments */			["Winnar is you!"],
/* 11 action duration */		3,
/* 12 priority */			0,
/* 13 remove on completion */		true,
/* 14 show unconscious */		false
] call bis_fnc_holdActionAdd;

If i want to execute another script in line this line: "* 8 code executed on completion */" how do i have to write it?

Share this post


Link to post
Share on other sites

If i want to execute another script in line this line: "* 8 code executed on completion */" how do i have to write it?

/* 8 code executed on completion */    { null = [] execVM "yourScript.sqf";},

Share this post


Link to post
Share on other sites

It's just me that I can't call "Spawn BIS_fnc_showSubtitle" through a file .SQF ?

Share this post


Link to post
Share on other sites

Must be, because everything works for me and I am using this thing *a lot* now.

Share this post


Link to post
Share on other sites

It looks like I'll miss a few more hours of sleep then.

 

EDIT: 

 

I was using a wrong syntax

Share this post


Link to post
Share on other sites
Guys me again, I'm now having a problem with "bis_fnc_holdActionAdd" He can't read the script I did for some reason I still do not know (for me the code is written correctly).
 
Here is the code
 
params ["_object"];

[
/* 0 object */				_object,
/* 1 action title */			"Upload",
/* 2 idle icon */			"\a3\ui_f_exp_a\Data\RscTitles\RscEGProgress\downloadicon_ca.paa",
/* 3 progress icon */			"\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\upload_ca.paa",
/* 4 condition to show */		"true",
/* 5 condition for action */		"true",
/* 6 code executed on start */		{["Raposa do Deserto", "Começando o upload"] call BIS_fnc_showSubtitle}; {[_object, 3] call BIS_fnc_dataTerminalAnimate},
/* 7 code executed per tick */		{hint "Uploading..."},
/* 8 code executed on completion */	{["Raposa do Deserto", "Upload completo"] call BIS_fnc_showSubtitle}; {["Marsupial", "Dados recebidos com sucesso"] call BIS_fnc_showSubtitle}; {[_object, 0] call BIS_fnc_dataTerminalAnimate},
/* 9 code executed on interruption */	{["Data Center", "Dados corrompidos, necessario reiniciar o processo"] call BIS_fnc_showSubtitle},
/* 10 arguments */			[],
/* 11 action duration */		10,
/* 12 priority */			0,
/* 13 remove on completion */		true,
/* 14 show unconscious */		false
] call bis_fnc_holdActionAdd;
 
And that is what is in the INIT of the object
 
null = this execVM "data_terminal\data_1.sqf"

 

EDIT: The error is thatiYSowL0.jpg

Share this post


Link to post
Share on other sites
{
    private ["_target", "_caller", "_id", "_arguments"];
    params [
        "_target", //OBJECT - the object which the action is assigned to
        "_caller", //OBJECT - the unit that activated the action
        "_id", //NUMBER - ID of the activated action (same as ID returned by addAction)
        "_arguments" //ARRAY - arguments given to the script if you are using the extended syntax
    ];

    //your code here
},

 

Also if you are using "dataTerminal" inside { }  then use "_target", not _object

 

 

Here implemented in your code

params ["_object"];

[
/* 0 object */                _object,
/* 1 action title */            "Upload",
/* 2 idle icon */            "\a3\ui_f_exp_a\Data\RscTitles\RscEGProgress\downloadicon_ca.paa",
/* 3 progress icon */            "\a3\ui_f\data\IGUI\Cfg\simpleTasks\types\upload_ca.paa",
/* 4 condition to show */        "true",
/* 5 condition for action */        "true",
/* 6 code executed on start */        
{
    ["Raposa do Deserto", "Começando o upload"] call BIS_fnc_showSubtitle; 
    [_target, 3] call BIS_fnc_dataTerminalAnimate;
},
/* 7 code executed per tick */        {hint "Uploading..."},
/* 8 code executed on completion */    

{
    ["Raposa do Deserto", "Upload completo"] call BIS_fnc_showSubtitle; 
    ["Marsupial", "Dados recebidos com sucesso"] call BIS_fnc_showSubtitle; 
    [_target, 0] call BIS_fnc_dataTerminalAnimate;
},

/* 9 code executed on interruption */    
{
    ["Data Center", "Dados corrompidos, necessario reiniciar o processo"] call BIS_fnc_showSubtitle;
},
/* 10 arguments */            [],
/* 11 action duration */        10,
/* 12 priority */            0,
/* 13 remove on completion */        true,
/* 14 show unconscious */        false
] call bis_fnc_holdActionAdd;
  • Like 1

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

×