SQFhousepatrol script by Laggy.This is my first attempt in script submission.
Hope nothing similar is allready out there, in that case.
0.9 BETA version
In many missions I've missed the tension of enemy AI patrolling randomly in buildings.
Waypoints are static and just placing units in a building usually doesn't do the trick either.
With this easy to use script you just have to place a group close to any building with AI paths.
It is important to know the max number of positions in the building you want to use. This is checked easily in editor with a waypoint.
Script is MP friendly as far as I know, tested on a dedicated server.
Feedback and "adjustment ideas" are allways welcome.
The script can be run from a leaders init line or a trigger.
To set the script parameters is also important.
EXAMPLE:
call { [leader groupname, 180, 0, 266] execVM "SQFhousepatrol.sqf"; };
- leader groupname: The script is designed to be put in leaders init, in which case you can change "leader groupname" to "this".
Or do like in the example above in case of running from a trigger.
- 180: This number is the max number of seconds that runs before the units are ordered to new positions. The time limit is random.
Any time can be set, but the shorter the time, the more unlikely the units will reach their positions before ordered elsewhere.
In smaller buildings with less positions a shorter time period might be wanted.
In my example the range will be 0-180 seconds.
- 0: This is the lowest buildingposnumber you want any unit to move to.
Let's say you want a squad to only patrol a rooftop, then you set the "lowest" position desirable as this parameter.
This number can not be a negative one. 0 is the lowest possible.
In my example the lowest position is the first position in the building.
- 266: The highest buildingposnumber you want any unit to move to.
You might want the units to only patrol the bottom floor.
This number can not exceed the highest buildingposnumber that exists in the building. Nor can it be a negative number.
In my example this maxnumber is set for the "Hotel" building which has 266 positions.
So in my example mission the squad members of the defined group will roam around in the hotel in Arcadia.
They will each be given a position to move to, randomly chosen from ALL (266) positions.
After between 0-180 seconds they will get a new move order.
If they reach their position before the time limit is out they will stay there until the time limit is out.
Known issues:
If the script doesn't seem to work it is because the leader of the group is not close enough to the building.
Try to move the leader closer and it will work. This is probably because the ArmA engine gets confused.
If number of units are too high and the passages too small, the building gets crowded and the AI has problems moving efficiently.
Example mission included. Just as user folder to be easily put in editor.
MovingRandomInBuildingScript.Sara
Thanks to: All active on the OFPEC forum.
Finally:
Use at your own risk. Author will not take responsibility for anything.
Laggy