Probing Mechanics – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "Category:Arma 3: Editing {{Cfg ref|abc}} {{warning|The information on this page could be considered a '''SPOILER''' for the "First Contact" campaign of Arma 3 Contact...")
 
m (Text replacement - "[[Image:" to "[[File:")
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Arma 3: Editing]]
{{TOC|side}}
{{Cfg ref|abc}}
{{Feature|spoiler|[[Arma 3 Contact]]'s "First Contact" campaign}}


{{warning|The information on this page could be considered a '''SPOILER''' for the "First Contact" campaign of [[Arma 3 Contact]]!}}
{{GVI|arma3|1.94|category}}


= ED-1E Mini UGV =


== Track Lock Indicator ==
{{Clear}}
{{GVI|arma3|1.94}}
== ED-1E Mini UGV ==


[[Image:miniugv tracklock.jpg||200px]]
[[File:miniugv tracklock.jpg|right|200px]]
=== Track Lock Indicator ===


The track lock indicator (when the tracks are prevented from moving the vehicle) can be triggered with the following code. It's the UI indicator only and actual track locking is done by attaching the Mini UGV to e.g. a game logic.
The track lock indicator (when the tracks are prevented from moving the vehicle) can be triggered with the following code.
This concerns the UI indicator only, actual track locking is done by attaching the Mini UGV to e.g. a game logic in order to stop it.
<sqf>nameOfVehicle setVariable ["BIN_ugv_trackLock", true];</sqf>




{{Informative|nameOfVehicle setVariable ["bin_ugv_tracklock",true];}}
{{Clear}}
 
[[File:miniugv mfds.gif|right|600px]]
 
=== Mini UGV MFD Animations ===
== Mini UGV MFD Animations ==
 
[[Image:miniugv mfds.gif||600px]]


The following animations can be used with the '''animateSource''' script command to control the exterior MFD statuses. Most of these animations are hidden by default. In order to unhide them, you have to animate them to 0 phase.
The following animations can be used with the '''animateSource''' script command to control the exterior MFD statuses. Most of these animations are hidden by default. In order to unhide them, you have to animate them to 0 phase.
{| class="wikitable"
{| class="wikitable sortable"
| colspan="1" |'''Animation Name'''
! Animation Name
| colspan="1" |'''Functionality'''
! Functionality
| colspan="1" |'''Selection'''
! Selection
|-
|-
|Detector1Light1_Green
| Detector1Light1_Green
|Hiding the green light on the gas detector (top light)
| Hiding the green light on the gas detector (top light)
| colspan="1" |3
| 3
|-
|-
|Detector1Light1_Red
| Detector1Light1_Red
|Hiding the red light on the gas detector (top light)
| Hiding the red light on the gas detector (top light)
| colspan="1" |3
| 3
|-
|-
|Detector1Light2_Green
| Detector1Light2_Green
|Hiding the green light on the gas detector (bottom light)
| Hiding the green light on the gas detector (bottom light)
| colspan="1" |4
| 4
|-
|-
|Detector1Light2_Red
| Detector1Light2_Red
|Hiding the red light on the gas detector (bottom light)
| Hiding the red light on the gas detector (bottom light)
| colspan="1" |4
| 4
|-
|-
|Detector2Aux_hide
| Detector2Aux_hide
|Hiding the icon for the auxiliary attachment on the side MFD
| Hiding the icon for the auxiliary attachment on the side MFD
| colspan="1" |1
| 1
|-
|-
|Detector2Speaker_Off
| Detector2Speaker_Off
|Hiding the 'Speakers Off' icon on the side MFD
| Hiding the 'Speakers Off' icon on the side MFD
| colspan="1" |2
| 2
|-
|-
|Detector2Speaker_On
| Detector2Speaker_On
|Hiding the 'Speakers On' icon on the side MFD
| Hiding the 'Speakers On' icon on the side MFD
| colspan="1" |2
| 2
|-
|-
|ChemDetectorLight
| ChemDetectorLight
|Hiding the threat detected light on the chemical detector
| Hiding the threat detected light on the chemical detector
| colspan="1" |6
| 6
|-
|-
|ChemDetectorLevel1
| ChemDetectorLevel1
|Hiding the chemical detector's 1st status bar
| Hiding the chemical detector's 1st status bar
| colspan="1" |7
| 7
|-
|-
|ChemDetectorLevel2
| ChemDetectorLevel2
|Hiding the chemical detector's 2nd status bar
| Hiding the chemical detector's 2nd status bar
| colspan="1" |7
| 7
|-
|-
|ChemDetectorLevel3
| ChemDetectorLevel3
|Hiding the chemical detector's 3rd status bar
| Hiding the chemical detector's 3rd status bar
| colspan="1" |7
| 7
|-
|-
|BiopsyCapacity
| BiopsyCapacity
|Setting the biopsy probe capacity (goes from 1 to 100)
| Setting the biopsy probe capacity (goes from 1 to 100)
| colspan="1" |5
| 5
|}
|}
Example code to unhide all elements


<syntaxhighlight lang="cpp">
Example code to unhide all elements:
<sqf>
{
{
    ugv animateSource [_x,0,true];
ugv animateSource [_x, 0, true];
} foreach
} forEach [
[
"Detector1Light1_Green",
    "Detector1Light1_Green",  
"Detector1Light1_Red",
    "Detector1Light1_Red",  
"Detector1Light2_Green",
    "Detector1Light2_Green",  
"Detector1Light2_Red",
    "Detector1Light2_Red",
"Detector2Aux_hide",
    "Detector2Aux_hide",  
"Detector2Speaker_Off",
    "Detector2Speaker_Off",  
"Detector2Speaker_On",
    "Detector2Speaker_On",  
"ChemDetectorLight",
    "ChemDetectorLight",  
"ChemDetectorLevel1",
    "ChemDetectorLevel1",  
"ChemDetectorLevel2",
    "ChemDetectorLevel2",  
"ChemDetectorLevel3"
    "ChemDetectorLevel3"
];
];
ugv animateSource ["BiopsyCapacity",100];
ugv animateSource ["BiopsyCapacity", 100];
</syntaxhighlight>
</sqf>


= Probing Event Handlers =


== probingStarted ==
== Probing Event Handlers ==
 
=== probingStarted ===
 
Event handler returns following information:
Event handler returns following information:


* 0. '''object''': Object - object which was scanned
* 0. '''object''': Object - object which was scanned
* 1. '''material''': String - name of the material
* 1. '''material''': String - name of the material
* 2. '''completion''': Number - how much information about that material was gathered (from 0 to 100)
* 2. '''completion''': Number - how much information about that material was gathered (from 0 to 100)


<syntaxhighlight lang="cpp">
<sqf>
BIN_ProbeEvent_1 = [missionnamespace, "probingStarted", {
BIN_ProbeEvent_1 = [missionNamespace, "probingStarted", {
    params["_object","_data","_completion"];
params["_object", "_data", "_completion"];
    if(_object isEqualTo Probe_2)then
    {
        if(_data isEqualTo "alien" )then
        {
            hint "Probing started, hold left mouse button until the scan is completed.";
        } else {
            hint "Try pointing at the center of the probe when the cover is open.";
        };
    } else {
    };
}] call bis_fnc_addScriptedEventHandler;
</syntaxhighlight>


== probingEnded ==
if (_object isEqualTo Probe_2) then
{
if (_data isEqualTo "alien") then
{
hint "Probing started, hold left mouse button until the scan is completed.";
} else {
hint "Try pointing at the center of the probe when the cover is open.";
};
} else {
// ...
};
}] call BIS_fnc_addScriptedEventHandler;
</sqf>


* 0. '''data''': Array - array containing following information:<br />
=== probingEnded ===
** 0. '''object''': Object - object which was scanned
 
* 0. '''data''': Array - array containing following information:<br>
** 0. '''object''': Object - object which was scanned
** 1. '''material''': String - name of the material
** 1. '''material''': String - name of the material
** 2. '''completion''': Number - how much information about that material was gathered (from 0 to 100)
** 2. '''completion''': Number - how much information about that material was gathered (from 0 to 100)
* 1. '''success''': Boolean - returns true if probing was fully completed (meaning laser probing was not interrupted for example)
* 1. '''success''': Boolean - returns true if probing was fully completed (meaning laser probing was not interrupted for example)


<syntaxhighlight lang="cpp">
<sqf>
BIN_ProbeEvent_2 = [missionnamespace, "probingEnded", {
BIN_ProbeEvent_2 = [missionNamespace, "probingEnded", {
    params["_data","_success"];
params ["_data", "_success"];
    if(_success && {(_data # 0 == Probe_2) && (_data # 1 == "ALIEN")})then
 
    {
if (_success && {(_data # 0 == Probe_2) && (_data # 1 == "ALIEN")}) then
        hint "Scan completed";
{
hint "Scan completed";
        player setCurrentTask (simpleTasks player # 2);
 
        (simpleTasks player # 1) setTaskState "Succeeded";
player setCurrentTask (simpleTasks player # 2);
        ["BIN_tskProbe1", "SUCCEEDED"] call BIS_fnc_taskSetState;
(simpleTasks player # 1) setTaskState "Succeeded";
        "BIN_tskProbe2" call BIS_fnc_taskSetCurrent;
["BIN_tskProbe1", "SUCCEEDED"] call BIS_fnc_taskSetState;
        [missionnamespace, "probingStarted", BIN_ProbeEvent_1] call BIS_fnc_removeScriptedEventHandler;
"BIN_tskProbe2" call BIS_fnc_taskSetCurrent;
        [missionnamespace, "probingEnded", BIN_ProbeEvent_2] call BIS_fnc_removeScriptedEventHandler;
[missionNamespace, "probingStarted", BIN_ProbeEvent_1] call BIS_fnc_removeScriptedEventHandler;
    };
[missionNamespace, "probingEnded",   BIN_ProbeEvent_2] call BIS_fnc_removeScriptedEventHandler;
}] call bis_fnc_addScriptedEventHandler;
};
</syntaxhighlight>
}] call BIS_fnc_addScriptedEventHandler;
</sqf>




= Probe Tip animations =
== Probe Tip Animations ==
 
Note that the Probe is referred to as "Alien Network" in the game. Probe tips can be animated with the following function:
Note that the Probe is referred to as "Alien Network" in the game. Probe tips can be animated with the following function:


{{Informative|[nameOfProbe,state,speedFactor,soundTypes] call '''bin_fnc_probeAnim''';}}
<sqf>[nameOfProbe, state, speedFactor, soundTypes] call BIN_fnc_probeAnim;</sqf>
Parameters:
Parameters:
* '''nameOfProbe''': Object - name of the probe you would like to animate
* '''nameOfProbe''': Object - name of the probe you would like to animate
* '''state:''' Number - 0 or 1 where 1 means that the inner tissue will be expanded
* '''state:''' Number - 0 or 1 where 1 means that the inner tissue will be expanded
Line 161: Line 163:


Example code:
Example code:
<syntaxhighlight lang="cpp">[nameOfProbe,1] call bin_fnc_probeAnim;
<sqf>[nameOfProbe, 1] call BIN_fnc_probeAnim;</sqf>
</syntaxhighlight>
 
 
== Example Mission ==
 
* https://steamcommunity.com/sharedfiles/filedetails/?id=1841970902
 
 
== See Also ==
 
* [[:Category:Function Group: Probe|Function Group: Probe]]
 


= Example Missions =
{{GameCategory|arma3|Editing}}
[[Category:Introduced with Arma 3 version 1.94]]

Latest revision as of 23:10, 20 November 2023

Spoiler Warning
The following text contains game spoilers such as story details or mission walkthroughs. Read at your own risk!
The potential spoilers concern the following topic: Arma 3 Contact's "First Contact" campaign.


Arma 3 logo black.png1.94

ED-1E Mini UGV

miniugv tracklock.jpg

Track Lock Indicator

The track lock indicator (when the tracks are prevented from moving the vehicle) can be triggered with the following code. This concerns the UI indicator only, actual track locking is done by attaching the Mini UGV to e.g. a game logic in order to stop it.

nameOfVehicle setVariable ["BIN_ugv_trackLock", true];


miniugv mfds.gif

Mini UGV MFD Animations

The following animations can be used with the animateSource script command to control the exterior MFD statuses. Most of these animations are hidden by default. In order to unhide them, you have to animate them to 0 phase.

Animation Name Functionality Selection
Detector1Light1_Green Hiding the green light on the gas detector (top light) 3
Detector1Light1_Red Hiding the red light on the gas detector (top light) 3
Detector1Light2_Green Hiding the green light on the gas detector (bottom light) 4
Detector1Light2_Red Hiding the red light on the gas detector (bottom light) 4
Detector2Aux_hide Hiding the icon for the auxiliary attachment on the side MFD 1
Detector2Speaker_Off Hiding the 'Speakers Off' icon on the side MFD 2
Detector2Speaker_On Hiding the 'Speakers On' icon on the side MFD 2
ChemDetectorLight Hiding the threat detected light on the chemical detector 6
ChemDetectorLevel1 Hiding the chemical detector's 1st status bar 7
ChemDetectorLevel2 Hiding the chemical detector's 2nd status bar 7
ChemDetectorLevel3 Hiding the chemical detector's 3rd status bar 7
BiopsyCapacity Setting the biopsy probe capacity (goes from 1 to 100) 5

Example code to unhide all elements:

{ ugv animateSource [_x, 0, true]; } forEach [ "Detector1Light1_Green", "Detector1Light1_Red", "Detector1Light2_Green", "Detector1Light2_Red", "Detector2Aux_hide", "Detector2Speaker_Off", "Detector2Speaker_On", "ChemDetectorLight", "ChemDetectorLevel1", "ChemDetectorLevel2", "ChemDetectorLevel3" ]; ugv animateSource ["BiopsyCapacity", 100];


Probing Event Handlers

probingStarted

Event handler returns following information:

  • 0. object: Object - object which was scanned
  • 1. material: String - name of the material
  • 2. completion: Number - how much information about that material was gathered (from 0 to 100)

BIN_ProbeEvent_1 = [missionNamespace, "probingStarted", { params["_object", "_data", "_completion"]; if (_object isEqualTo Probe_2) then { if (_data isEqualTo "alien") then { hint "Probing started, hold left mouse button until the scan is completed."; } else { hint "Try pointing at the center of the probe when the cover is open."; }; } else { // ... }; }] call BIS_fnc_addScriptedEventHandler;

probingEnded

  • 0. data: Array - array containing following information:
    • 0. object: Object - object which was scanned
    • 1. material: String - name of the material
    • 2. completion: Number - how much information about that material was gathered (from 0 to 100)
  • 1. success: Boolean - returns true if probing was fully completed (meaning laser probing was not interrupted for example)

BIN_ProbeEvent_2 = [missionNamespace, "probingEnded", { params ["_data", "_success"]; if (_success && {(_data # 0 == Probe_2) && (_data # 1 == "ALIEN")}) then { hint "Scan completed"; player setCurrentTask (simpleTasks player # 2); (simpleTasks player # 1) setTaskState "Succeeded"; ["BIN_tskProbe1", "SUCCEEDED"] call BIS_fnc_taskSetState; "BIN_tskProbe2" call BIS_fnc_taskSetCurrent; [missionNamespace, "probingStarted", BIN_ProbeEvent_1] call BIS_fnc_removeScriptedEventHandler; [missionNamespace, "probingEnded", BIN_ProbeEvent_2] call BIS_fnc_removeScriptedEventHandler; }; }] call BIS_fnc_addScriptedEventHandler;


Probe Tip Animations

Note that the Probe is referred to as "Alien Network" in the game. Probe tips can be animated with the following function:

[nameOfProbe, state, speedFactor, soundTypes] call BIN_fnc_probeAnim;

Parameters:

  • nameOfProbe: Object - name of the probe you would like to animate
  • state: Number - 0 or 1 where 1 means that the inner tissue will be expanded
  • speedFactor (Optional): Number - animation speed factor (default is 1)
  • soundTypes (Optional): Number - custom sounds for probe tip animations (default ["SoundSetSource_Sfx_Probe_Retract_01","SoundSetSource_Sfx_Probe_Expand_01"])

Example code:

[nameOfProbe, 1] call BIN_fnc_probeAnim;


Example Mission


See Also