Spawn Vehicles that will Patrol any Area You Specify!
I will be showing you how to spawn a vehicle group of any type,
that will then patrol, you can use vanilla or mod groups with this.
You can spawn vehicles with or without infantry anywhere with
a trigger whether it be a radio trigger or an area trigger, the code
being used are vanilla functions.
Below is the code seen in the video, just a note and recommendation:
its best to type the code into a notepad doc, notepad++ or another
document type then to copy and paste the code, as sometimes
if you copy code from a post depending on the source it may include
hidden characters in the code, so just a thought.
Here is the code, the code is missing angled brackets, Youtube
doesn't allow them in the description, they are the double greater than
signs, these go after the configfile, refer to the video for reference.
_veh = [getMarkerPos "mark", west, (configfile "CfgGroups" "West" "BLU_F" "Armored" "BUS_TankSection")] call BIS_fnc_spawnGroup;
[_veh, getmarkerpos "mark", 300] call BIS_fnc_TaskPatrol;
hint "An enemy group has spawned!";
Save the code with whatever name you want just be sure to call it
through a trigger or another means with the following code:
code to call script in a trigger:
nul = execVM "myscriptname.sqf";
the name you use here will be the name of your script, if your not sure
refer to the video, or ask in the comments.
Timestamps
0:00 Introduction
1:40 Add code
3:50 Code review
5:30 Save code into a script
6:47 Add code to trigger to call the script
7:41 CfgGroups code
10:23 Add new code to script from the config viewer
11:11 Test the mission
12:25 Another method to spawn vehicles using an area trigger
14:13 Get new code from cfggroups for enemy group
14:45 Add code to the script
Music used in the video:
--------------------------------------
- ES_Trust the Process by Ballpoint
- ES_Subtract by Lofive
- ES_Spacetime by STRLGHT
Codes & Scripts Playlist
https://www.youtube.com/playlist?list=PLUsyty1OYgb17O63BwUZRBgQqonrBVOD-
Arma 3 Tutorials Playlist
https://www.youtube.com/playlist?list=PLUsyty1OYgb0CTC62sCyddDSU3pI6rGO_
Arma 3 Code Snippets Playlist
https://www.youtube.com/playlist?list=PLUsyty1OYgb1QejvlCOJXRzci1uvlyjVV