Gunter Severloh 4067 Posted March 24 RYD_PT Patrol Script by Rydygier & Gunter Severloh Description RYD_PT is short for Rydygier's Patrol Script, PT = patrol. The script was written by Rydygier along with ideas, testing and added comments to the script by Gunter Severloh. This project started in early 2022, and was worked on and off since then, it mainly started when i went to Rydygier about some ideas for a patrol script for vehicles and planes. After alot of time, building, testing, and updating months later i released my mission using this script Knights of the Sky and then later Aces of the Sky, along with updates to the code and added features. What does the script do? The script will allow you to spawn vehicles, planes, helicopters, cars, trucks, apc's, tanks, and even infantry of any type. Once a unit or a group spawns based on whatever is defined in the script they will patrol a marker you define, you can set the unit or group's speed, behavior, and combat mode, you can also track them on the map which is disabled by default. You can spawn any vanilla asset be it civilian, military and even spawn anything from any mod to patrol. Features Spawn any type of vehicle that will patrol: cars, trucks, apc's, armored civilian or military. Spawn any type of plane or helicopter that will move and patrol. Spawn any type of of infantry that will move and patrol. Spawn any assets from the vanilla game or from a mod. Spawn assets from any genre, be it modern, WW2, Sci Fi, and Zombies. Track units on the map with a marker, disabled by default. Set the behavior, combat mode, and the speed at which units or groups will patrol. Define in the script via classnames from a pool what will spawn and patrol. Spawn assets through an area, or radio trigger which will then patrol a marker you setup on the map. Assets can patrol any size area and stay within that area or zone you define. When vehicles, or planes are destroyed the script will delete them in 60 seconds (default) which you can change. Works in singleplayer and multiplayer - tested in mp lan, and on a dedicated. ========== Download - (Demo mission) - (no mods required) Download the demo mission, install the mission into the editor folder here: C:\Users\username\Documents\Arma 3\missions You can spawn some vanilla assets by accessing the radio menu 0-0, there you will see spawn plane, spawn vehicles, and spawn infantry. If you go to the map, you will see 3 circles, the largest is for the plane to patrol, the 2nd largest is for vehicles, and the smallest is for infantry. Demo mission LINK: https://drive.google.com/file/d/1UeMDEgYhVaIPlP2Z6EYTwuQx0H3k1R44/view?usp=sharing Download - (Script only) https://drive.google.com/file/d/1hjZcryhI98kcbzv-32-4sLuWjYpKBJ4I/view?usp=sharing Script Installation Move the RYD_PT.sqf into your mission folder, you will also need the init.sqf either use the one included with the script or copy and paste the code from the included init.sqf to your init.sqf. This is the code needed to be in a init.sqf: Note - If your going to use this script on a server then put the code below in a initserver.sqf call compile preprocessFileLineNumbers "RYD_PT\RYD_PT_fnc.sqf"; Script Usage Using the script, you'll need to open the script with notepad or notepad++ there are comment descriptions above certain parts of the code that explain what certain code does and how to use it. The video below will introduce, demonstrate, and show you how to use and customize the script for your scenarios. Spawn Patrols of Planes, Helicopters, Tanks, Vehicles, & Infantry in Your Scenario with this Script! Place the following codes in the init box of an area trigger or a radio trigger to spawn the desired assets. For spawning planes to patrol: [(selectRandom RYD_PT_vehiclesPool5),"area4",200] call RYD_PT_CreatePatrolPlane; For spawning Vehicles or tanks to patrol: nul = [] spawn { { [_x,"area1"] call RYD_PT_CreatePatrol; sleep 1; } foreach RYD_PT_vehiclesPool1; }; For spawning infantry to patrol: [[configfile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_InfSquad",west],"area2"] call RYD_PT_CreatePatrolInfantry; For spawning a custom squad of infantry to patrol: Another option in the box below is to spawn a custom infantry to patrol is to put the code below into a trigger: In between the brackets are classnames of individual soldiers (units), you can acquire them, by placing the units you want, then right clicking them, then go down to log ---> log classes to clipboard. Then paste the classnames in between the brackets as seen below, add " " (quotes) before and after each classname, and seperate each classname with a , (coma) no coma after the last classname. Use the code box below as your example reference. [[["B_recon_TL_F","B_recon_M_F","B_recon_medic_F","B_recon_F"],west],"area1"] call RYD_PT_CreatePatrolInfantry; Spawn Your Custom Squad from Any Faction, Genre, or Mod that will Patrol using RYD_PT Script! ConfigViewer For the infantry code you will use the config viewer inside the editor to acquire the code for the group you want, once you paste the code you want, then you will add west],"area2"] call RYD_PT_CreatePatrolInfantry; to the end of it to call the code in the trigger's init to spawn the group. Marker setup In the codes above it says area4, area1, and area2 those are example names for a marker, so in the editor, on the map place a marker set the marker to whatever size you want, name the marker and then put that name into the code in replace of area4. Remember the codes will be in the triggers, and the names of the markers will be in the codes in the triggers you placed. Patrol Behavior, Combat Mode, & Speed In the script, the vehicles, planes, and infantry have a part in the code where when they patrol have their state of behavior set, this is the code: _group setBehaviourStrong "AWARE"; // This sets the vehicle's behavior _group setCombatMode "YELLOW"; // This sets the vehicle's combat mode _group setSpeedMode "NORMAL"; // This sets the vehicle's speed BI Wiki You can use the following wiki pages to change how the patrols will patrol: https://community.bistudio.com/wiki/behaviour https://community.bistudio.com/wiki/Combat_Modes https://community.bistudio.com/wiki/2D_Editor:_Waypoints#Select_Type 4 2 Share this post Link to post Share on other sites