R3vo/Sandbox1 – User

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Blanked the page)
(37 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{TOC|side}}
[[File:TargetBootcampHumanSimple F.jpg|right|270px]]
Arma 3 comes with a variety of shooting targets. Most of these targets come with a somewhat hidden functionality which is explained on this page.


= Changing pop-up-behaviour =
The pop-up-behaviour can be changed by setting the variable</tt>noPop</tt> in [[missionNamespace]].
  [[missionNamespace]] [[setVariable]] ["noPop", [[true]]]; {{cc|Will prevent the targets from popping up again once they were hit}}
  [[missionNamespace]] [[setVariable]] ["noPop", [[false]]]; {{cc|Targets will pop up normally again after they were hit}}
= Animating the targets =
All of the above listed targets have an animation source called <tt>terc</tt>. This can be used to change the angle of the target.
Let's say we have a pop up target place in the editor with the name <tt>popUpTarget</tt>:
  popUpTarget [[animateSource]] ["terc", 0.5]; {{cc|Target will have an angle of 45°}}
  popUpTarget [[animateSource]] ["terc", 1]; {{cc|Target will have an angle of 180°}}
  popUpTarget [[animateSource]] ["terc", 0]; {{cc|Target will have an angle of 90° e.g. the target will stand up straight}}
{{Feature|Informative|'''Random Fact:''' "terc" is Czech and means Object.}}
= Example mission with "noPop" and "terc" =
1. Open a new mission in [[Eden Editor]] and save it.</br>
2. Place three pop-up targets. Make sure they are compatible. See {{HashLink|{{PAGENAME}}#Targets}}.</br>
3. Name the pop-up targets <tt>target_0, target_1, target_2</tt>.</br>
4. Place any object you would like to use to control the targets' states and name it <tt>flag_control_targets</tt>.</br>
5. Navigate to ''Menu Strip'' → ''Scenario'' → ''Open Scenario Folder''.</br>
6. In that folder create a file called <tt>initPlayerLocal.sqf</tt>. See [[Event Scripts]] for more information.</br>
7. Paste the following code into that file and save it.</br>
<code>{{cc|Three local actions are added to the object <tt>flag_control_targets</tt>. These actions are available for every player}}
{{cc|Reset the animation state of all three targets}}
flag_control_targets addAction ["Reset Targets", {[target_0, target_1, target_2] apply {_x animateSource ["terc", 0]}}];
{{cc|Disable the pop-up functionality by setting "noPop" to true globally}}
flag_control_targets addAction ["Disable pop-up", {missionNamespace setVariable ["noPop", true, true]}];
{{cc|Enable the pop-up functionality by setting "noPop" to false globally. The targets will not automatically reset. Use the Reset Targets action}}
flag_control_targets addAction ["Enable pop-up", {missionNamespace setVariable ["noPop", false, true]}];</code>
8. Preview the mission and play around with the targets.</br>
= Moving targets on rails =
There is no official way of doing this. Just download some script ¯\_(ツ)_/¯
= See also =
== Interesting Scripts ==
The following scripts are used to animate the targets. Some of them only create a simply destruction effect, others are more sophisticated.
To see their content, combine [[loadFile]] with the path.
* <tt>a3\structures_f_mark\items\sport\scripts\balloon_01_air_f_hitpart.sqf</tt>
* <tt>a3\structures_f_mark\items\sport\scripts\balloon_01_water_f_hitpart.sqf</tt>
* <tt>a3\structures_f_epa\items\vessels\scripts\eaudecombat_01_f_hitpart.sqf</tt>
* <tt>a3\props_f_orange\humanitarian\supplies\scripts\fruit_hitpart.sqf</tt>
* <tt>a3\structures_f\training\data\scripts\land_target_oval_f_hitpart.sqf</tt>
* <tt>a3\structures_f\training\data\scripts\metal_pole_skeet_f_hitpart.sqf</tt>
* <tt>a3\structures_f\training\data\scripts\skeet_clay_f_hitpart.sqf</tt>
* <tt>a3\structures_f_mark\training\scripts\target_dueling_01_f_hitpart.sqf</tt>
* <tt>a3\structures_f_mark\training\scripts\target_swivel_01_f_hitpart.sqf</tt>
* <tt>a3\structures_f\training\data\scripts\targetp_inf_f_hitpart.sqf</tt>
== Targets ==
The following targets all possess the "terc" animation source and can therefore be animated.
{| class="wikitable"
|-
! Display Name !! Class
|-
| Pop-Up Target 1 || <tt>TargetP_Inf_F</tt>
|-
| Pop-Up Target 1 (Zones) || <tt>TargetP_Inf_Acc1_F</tt>
|-
| Pop-Up Target 1 (Accuracy) || <tt>TargetP_Inf_Acc2_F</tt>
|-
| Moving Target 1 (Side) || <tt>Target_PopUp_Moving_F</tt>
|-
| Moving Target 1 (Side - Zones) || <tt>Target_PopUp_Moving_Acc1_F</tt>
|-
| Moving Target 1 (Side - Accuracy) || <tt>Target_PopUp_Moving_Acc2_F</tt>
|-
| Moving Target 1 (Front) || <tt>Target_PopUp_Moving_90deg_F</tt>
|-
| Moving Target 1 (Front - Zones) || <tt>Target_PopUp_Moving_90deg_Acc1_F</tt>
|-
| Moving Target 1 (Front - Accuracy) || <tt>Target_PopUp_Moving_90deg_Acc2_F</tt>
|-
| Pop-Up Target 2 || <tt>TargetP_Inf2_F</tt>
|-
| Pop-Up Target 2 (Zones) || <tt>TargetP_Inf2_Acc1_F</tt>
|-
| Pop-Up Target 2 (Accuracy) || <tt>TargetP_Inf2_Acc2_F</tt>
|-
| Moving Target 2 (Side) || <tt>Target_PopUp2_Moving_F</tt>
|-
| Moving Target 2 (Side - Zones) || <tt>Target_PopUp2_Moving_Acc1_F</tt>
|-
| Moving Target 2 (Side - Accuracy) || <tt>Target_PopUp2_Moving_Acc2_F</tt>
|-
| Moving Target 2 (Front) || <tt>Target_PopUp2_Moving_90deg_F</tt>
|-
| Moving Target 2 (Front - Zones) || <tt>Target_PopUp2_Moving_90deg_Acc1_F</tt>
|-
| Moving Target 2 (Front - Accuracy) || <tt>Target_PopUp2_Moving_90deg_Acc2_F</tt>
|-
| Pop-Up Target 3 || <tt>TargetP_Inf3_F</tt>
|-
| Pop-Up Target 3 (Zones) || <tt>TargetP_Inf3_Acc1_F</tt>
|-
| Pop-Up Target 3 (Accuracy) || <tt>TargetP_Inf3_Acc2_F</tt>
|-
| Moving Target 3 (Side) || <tt>Target_PopUp3_Moving_F</tt>
|-
| Moving Target 3 (Side - Zones) || <tt>Target_PopUp3_Moving_Acc1_F</tt>
|-
| Moving Target 3 (Side - Accuracy) || <tt>Target_PopUp3_Moving_Acc2_F</tt>
|-
| Moving Target 3 (Front) || <tt>Target_PopUp3_Moving_90deg_F</tt>
|-
| Moving Target 3 (Front - Zones) || <tt>Target_PopUp3_Moving_90deg_Acc1_F</tt>
|-
| Moving Target 3 (Front - Accuracy) || <tt>Target_PopUp3_Moving_90deg_Acc2_F</tt>
|-
| Pop-Up Zombie 1 || <tt>TargetP_Zom_F</tt>
|-
| Pop-Up Zombie 1 (Zones) || <tt>TargetP_Zom_Acc1_F</tt>
|-
| Moving Zombie 1 (Side) || <tt>Zombie_PopUp_Moving_F</tt>
|-
| Moving Zombie 1 (Side - Zones) || <tt>Zombie_PopUp_Moving_Acc1_F</tt>
|-
| Moving Zombie 1 (Front) || <tt>Zombie_PopUp_Moving_90deg_F</tt>
|-
| Moving Zombie 1 (Front - Zones) || <tt>Zombie_PopUp_Moving_90deg_Acc1_F</tt>
|-
| Pop-Up Hostage 1 || <tt>TargetP_Civ_F</tt>
|-
| Moving Hostage 1 (Side) || <tt>Hostage_PopUp_Moving_F</tt>
|-
| Moving Hostage 1 (Front) || <tt>Hostage_PopUp_Moving_90deg_F</tt>
|-
| Pop-Up Hostage 2 || <tt>TargetP_Civ2_F</tt>
|-
| Moving Hostage 2 (Side) || <tt>Hostage_PopUp2_Moving_F</tt>
|-
| Moving Hostage 2 (Front) || <tt>Hostage_PopUp2_Moving_90deg_F</tt>
|-
| Pop-Up Hostage 3 || <tt>TargetP_Civ3_F</tt>
|-
| Moving Hostage 3 (Side) || <tt>Hostage_PopUp3_Moving_F</tt>
|-
| Moving Hostage 3 (Front) || <tt>Hostage_PopUp3_Moving_90deg_F</tt>
|-
| Target Human Simple || <tt>TargetBootcampHumanSimple_F</tt>
|-
| Target Human || <tt>TargetBootcampHuman_F</tt>
|-
| Pop-Up Target 4 || <tt>TargetP_Inf4_F</tt>
|-
| Pop-Up Target 4 (Zones) || <tt>TargetP_Inf4_Acc1_F</tt>
|-
| Pop-Up Target 4 (Accuracy) || <tt>TargetP_Inf4_Acc2_F</tt>
|-
| Moving Target 4 (Side) || <tt>Target_PopUp4_Moving_F</tt>
|-
| Moving Target 4 (Side - Zones) || <tt>Target_PopUp4_Moving_Acc1_F</tt>
|-
| Moving Target 4 (Side - Accuracy) || <tt>Target_PopUp4_Moving_Acc2_F</tt>
|-
| Moving Target 4 (Front) || <tt>Target_PopUp4_Moving_90deg_F</tt>
|-
| Moving Target 4 (Front - Zones) || <tt>Target_PopUp4_Moving_90deg_Acc1_F</tt>
|-
| Moving Target 4 (Front - Accuracy) || <tt>Target_PopUp4_Moving_90deg_Acc2_F</tt>
|-
| Pop-Up Target 5 || <tt>TargetP_HVT1_F</tt>
|-
| Moving Target 5 (Side) || <tt>Target_PopUp_HVT1_Moving_F</tt>
|-
| Moving Target 5 (Front) || <tt>Target_PopUp_HVT1_Moving_90deg_F</tt>
|-
| Pop-Up Target 6 || <tt>TargetP_HVT2_F</tt>
|-
| Moving Target 6 (Side) || <tt>Target_PopUp_HVT2_Moving_F</tt>
|-
| Moving Target 6 (Front) || <tt>Target_PopUp_HVT2_Moving_90deg_F</tt>
|-
| Pop-Up Target 7 || <tt>TargetP_Inf7_F</tt>
|-
| Pop-Up Target 7 (Zones) || <tt>TargetP_Inf7_Acc1_F</tt>
|-
| Pop-Up Target 7 (Accuracy) || <tt>TargetP_Inf7_Acc2_F</tt>
|-
| Moving Target 7 (Side) || <tt>Target_PopUp7_Moving_F</tt>
|-
| Moving Target 7 (Side - Zones) || <tt>Target_PopUp7_Moving_Acc1_F</tt>
|-
| Moving Target 7 (Side - Accuracy) || <tt>Target_PopUp7_Moving_Acc2_F</tt>
|-
| Moving Target 7 (Front) || <tt>Target_PopUp7_Moving_90deg_F</tt>
|-
| Moving Target 7 (Front - Zones) || <tt>Target_PopUp7_Moving_90deg_Acc1_F</tt>
|-
| Moving Target 7 (Front - Accuracy) || <tt>Target_PopUp7_Moving_90deg_Acc2_F</tt>
|-
| Pop-Up Target 8 || <tt>TargetP_Inf8_F</tt>
|-
| Pop-Up Target 8 (Zones) || <tt>TargetP_Inf8_Acc1_F</tt>
|-
| Pop-Up Target 8 (Accuracy) || <tt>TargetP_Inf8_Acc2_F</tt>
|-
| Moving Target 8 (Side) || <tt>Target_PopUp8_Moving_F</tt>
|-
| Moving Target 8 (Side - Zones) || <tt>Target_PopUp8_Moving_Acc1_F</tt>
|-
| Moving Target 8 (Side - Accuracy) || <tt>Target_PopUp8_Moving_Acc2_F</tt>
|-
| Moving Target 8 (Front) || <tt>Target_PopUp8_Moving_90deg_F</tt>
|-
| Moving Target 8 (Front - Zones) || <tt>Target_PopUp8_Moving_90deg_Acc1_F</tt>
|-
| Moving Target 8 (Front - Accuracy) || <tt>Target_PopUp8_Moving_90deg_Acc2_F</tt>
|-
| Pop-Up Target 9 || <tt>TargetP_Inf9_F</tt>
|-
| Pop-Up Target 9 (Zones) || <tt>TargetP_Inf9_Acc1_F</tt>
|-
| Pop-Up Target 9 (Accuracy) || <tt>TargetP_Inf9_Acc2_F</tt>
|-
| Moving Target 9 (Side) || <tt>Target_PopUp9_Moving_F</tt>
|-
| Moving Target 9 (Side - Zones) || <tt>Target_PopUp9_Moving_Acc1_F</tt>
|-
| Moving Target 9 (Side - Accuracy) || <tt>Target_PopUp9_Moving_Acc2_F</tt>
|-
| Moving Target 9 (Front) || <tt>Target_PopUp9_Moving_90deg_F</tt>
|-
| Moving Target 9 (Front - Zones) || <tt>Target_PopUp9_Moving_90deg_Acc1_F</tt>
|-
| Moving Target 9 (Front - Accuracy) || <tt>Target_PopUp9_Moving_90deg_Acc2_F</tt>
|-
| Pop-Up Alien 1 || <tt>TargetP_Alien1_F</tt>
|-
| Pop-Up Alien 1 (Zones) || <tt>TargetP_Alien1_Acc1_F</tt>
|-
| Moving Alien 1 (Side) || <tt>Target_PopUp_Alien1_Moving_F</tt>
|-
| Moving Alien 1 (Side - Zones) || <tt>Target_PopUp_Alien1_Moving_Acc1_F</tt>
|-
| Moving Alien 1 (Front) || <tt>Target_PopUp_Alien1_Moving_90deg_F</tt>
|-
| Moving Alien 1 (Front - Zones) || <tt>Target_PopUp_Alien1_Moving_90deg_Acc1_F</tt>
|}
<code>
popUpTargets = "{| class=""wikitable""
|-
! Display Name !! Class";
{
  if (isClass (_x >> "AnimationSources" >> "Terc")) then
  {
    popUpTargets = popUpTargets + endl + "|-" + endl + "| " + getText (_x >> "displayName") + " || " + "{{ic|" + configName _x + "}}";
  };
} forEach ("getNumber (_x >> 'scope') > 1" configClasses (configfile >> "CfgVehicles"));
copyToClipboard (popUpTargets + endl + "|}");</code>

Revision as of 19:50, 26 August 2022