Author: norrin
Author Website:

Requirements: No addons required

Version: 1.0

Short description:

Date: 2009-07-26 14:50


Comments: (0)
Rating:



 



AI vehicle respawn patrol area using UPS
by
norrin


Description:
AI vehicle respawn patrol an area using Kronzky's UPS script.


Usage:
1. Copy AIvcl_respawn_WP folder to your mission directory
2. Create a manned AI vehicle that will respawn in the editor
3. in the init line of the vehicle put:
nul = [this, 3, 10, "WS1","WP_scripts\WP1.sqf"] execVM "AIvcl_respawn_WP\AIvcl_respawn_WP_init.sqf";
where:
3 - is the number of times you want the AI unit to respawn;
10 - is the delay in seconds after the unit dies that you want it to respawn in
"WS1" - is the marker postion where you want the AI units to respawn
"WP_scripts\WP1.sqf" - is the name of path and the script that will add the waypoints.

In the test mission I have put the waypoint script in the directory called WP_scripts and the script that adds the waypoints is called "WP1.sqf"

It commands the units to move to WPs created at markers. In the test mission the WP markers for AI units are called:"WP1" and "WP2" and the code looks like this:
_unit = _this select 0;
_group = group _unit;

_waypoint0 = _group addwaypoint[getmarkerpos"WP1",0];
_waypoint0 setwaypointtype"Move"; 

_waypoint1 = _group addwaypoint[getmarkerpos"WP2",0];
_waypoint1 setwaypointtype"Move"; 

Adapt this script to your own purposes. For instance you can add additional WP markers or you could have several of these scripts in the mission so different units moveTo different positions.


Note:
* Each respawning AI vehicle needs to have the above code put in its init line.
* The respawning AI vehicles are created as the same type and their skill is set to the same level as set in the editor

Also in the test mission the player is setCaptive true so the enemy units will not shoot him.


Forum topic:
- OFPEC.com forums
- BI forums




Enable javascript to be able to download from Armaholic please!



Tags: No tags