RJ Wattenhofer

Tech writing, 3D model building and game design.

October 03, 2024

ArmA 2 | Spawning Soldiers with Timers

Set up multiple timers to spawn men, vehicles and items

arma 2 operation arrowhead logo
raymond wattenhofer ad rust custom workshop items ad World First Release, Only This drone quadcopter with both FPV&
 Auto-follow functions, can be controlled by Phone or Remote Control Sony Creative Software Inc. the power level ad airport madness game airport madness game 02 please dont touch anything game please dont touch anything game 02 pre-civilization marble age game pre-civilization marble age game 02 nendoroid link action figure nendoroid link action figure 02

In regard to the technique presented in this article, the word 'Spawn' is a misnomer. A more accurate term would be 'Reveal'. This is because the soldiers we are creating with timers are placed on the map in advance and temporarily hidden from view, whereas an actual spawned unit does not exist on the map and is created during game play.


Also see: Spawning Groups with BIS_fnc_spawnGroup


01

Click 'Units' and create any random person or object. This will act as the trigger activator and can be absolutely anything (ammo box, wall, etc). Give it a unique name (EX:'spawner01') and place it somewhere on the map away from the action.

To ensure it does not get damaged or killed, you can place the following code in its 'Initialization' field:

this addEventHandler ["HandleDamage", {false}];

If the trigger activator is destroyed your troops will not spawn, so it is important to protect it.

Click 'Units' again and create a soldier at the location on the map where you would like it to spawn. In the 'Name' field give this unit a unique name. I have named my example soldier 'isis01'. In the 'Initialization' field enter this code:

this enablesimulation false; this hideobject true;

This will make your soldier invisible; however, it is important to note that the unit's audio will not be disabled.

If you would like to make multiple soldiers at this location, simple hover over the new unit, hit Ctrl + C (copy), move your mouse over and then hit Ctrl + V (paste). You have just made a duplicate of your solder.

Double-click the soldier copy to open the 'Edit unit' window and rename this object something unique. In this case I named my duplicate soldier 'isis02'. Repeat this process as many times as desired.

arma 2 timed spawning 02

02

Click the 'Triggers' button on the right sidebar. Double-click somewhere near your soldier units to create a trigger. Click on the word 'Countdown' and a black box will appear around it.

In the 'Min', 'Mid' and 'Max' fields enter the amount of time in seconds that the soldiers should stay invisible before being spawned.

In this example I used 1500 seconds which is twenty-five minutes. This is a fixed time. If you would like to randomize the number using a range you can play with the numbers.

Place the next code in the 'Condition' field:

alive spawner01;

Replace the name 'spawner01' with the actual name of your trigger activator.

In the 'On Act.' field copy & paste this code:

{ _x enablesimulation true;_x hideobject false} foreach [isis01,isis02,isis03];

Replace the tail-end of the code (isis01,isis02,isis03) with all the names of your own units.

arma 2 timed spawning 03

03

The image below illustrates the setup described above, with the units and trigger placed on a road running through a BLUFOR military base. The image inset shows a blow-up of the area. The arrow points to the trigger ativator placed in the ocean far off in the distance.

arma 2 timed spawning 04

04

This next image shows a stylized representation of the hidden unit on the BLUFOR base. The red silhouette will not appear; this is simply to show you where the unit is located in relation to the objects around it.

One caveat to using this method: The units are invisible and take up no physical space (they can be passed through) but their audio is on, meaning they can be heard talking by players. You will need to keep this in mind when placing units.

This technique can be used in conjunction with waypoints which will enable predefined movement patterns for your soldiers.

arma 2 timed spawning 05

written by

Also see Spawn Your Friends Close and Your Enemies Closer

Related article: Adding Mission Tasks [ArmA 2]
Related article: Creating a Mission Intro Splash Screen [ArmA 2]
Related article: Creating Multiplayer Missions [ArmA 2]
Related article: General assembly: ArmA 2 VPN Setup [ArmA 2]
Related article: Detonate on Trigger: IED [ArmA 2]
Related article: Implement Looping Waypoints [ArmA 2]
Related article: Code Design Potpourri [ArmA 2]

bikini atoll 1946 cylidrome arena smart trivia game Cheap Silkroad R Sale Online, Fast And Safe, 24*7 online statis game statis game 02 country tales country tales 02 verdun game verdun game 02 ninja slayer action figure ninja slayer action figure
  • xing social button
  • linkedin social button
  • buffer social button
  • reddit social button
  • stumbleupon social button
  • facebook social button
  • google plus button
  • twitter social button
  • renren social button Renren
  • vkontakte social button Share in VK