Author: JW Custom
Author Website: http://arma2missions.webege.com/

Requirements: No addons required

Version: 1.4

Short description: This simple script will randomly place a unit/group around a defined marker within a defined radius.

Date: 2010-01-29 21:59


Comments: (7)
Rating:



 





4-uspsw.jpg

Ultra Simple Patrol Script
by
JW Custom


Description:
This simple script will randomly place a unit/group around a defined marker within a defined radius.
The unit/group will randomly patrol around a defined marker within a defined radius.

Main features:
    * Random start placement of units/groups
    * Randomly unit/group patrolling
Usage:
Put the below line in a units init field, f your working with a group you only need to put it in the leaders init field:
nul = [this, 500, "patrolMarker", "patrolMarker", 500, "AWARE", 100, "LIMITED", "FILE",0,75] execVM "USPS.sqf";

In the above example the unit/group will be randomly placed within a radius of 500m of the center of marker "patrolMarker".
The unit/group will randomly patrol in a radius of 500m of the center of marker "patrolMarker".
The unit/group bevaviour will be set to AWARE and it's chance of existing is 100%.
The unit/group will patrol in "FILE" formation with speed set to "LIMITED" which is walking speed.
The unit/group will wait 0 seconds at every waypoint before moving on to next.
The unit/groups spawn height and fly height is 75m, so in this case we are dealing with a aircraft.

Parameters:
argument 0: The unit/group leader we are dealing with
argument 1: The radius size where to randomly place the unit/group within
argument 2: The marker representing the radius center of where unit/group will be randomly placed within
argument 3: The marker representing the center of the unit/group patrol
argument 4: The radius size where unit/group will patrol within
argument 5: The behaviour of the unit/group. Select between: "CARELESS", "SAFE", "AWARE", "COMBAT", "STEALTH" .
argument 6: Chance of unit/group existing in percentage. If set to 100 the unit/group will always exist.
argument 7: Movement speed of the unit/group. Select between: "UNCHANGED", "LIMITED", "NORMAL", "FULL". (LIMITED = walk)
argument 8: Group formation. Select between: "NO CHANGE", "COLUMN", "STAG COLUMN", "WEDGE", "ECH LEFT", "ECH RIGHT", "VEE", "LINE", "FILE", "DIAMOND".
argument 9: Wait time in seconds before moving on to next waypoint. Set to 0 and theres no wait time.
argument 10: Altitude of unit/group. Unless unit/group are a air vehicle this should be set to 0.

Use large patrol radius for vehicles for best results.
Using script on grouped vehicles can give unwanted results!


Changelog:
v1.4
-added support for land & air vehicles
-added argument for spawn/fly height
-fixed a marker error (thanks Mikey74 for reporting)
-fixed a few issues

v1.3
-added alive check to stop waypoint loop when all units in group are dead

v1.2
-Using manual waypoint instead of BIS taskpatrol
-added argument for movement speed
-added argument for group formation
-added argument for wait time between waypoints
-minor tweaks

v1.1
-added agument for chance of existing
-fixed a few errors

v1.0
-initial release


Forum topic:
- BI forums




Enable javascript to be able to download from Armaholic please!



Tags: No tags