Author: Hoz
Author Website: http://www.ofpec.com

Requirements: No addons required

Version: 0.4

Short description:

Date: 2008-03-26 17:03


Comments: (0)
Rating:



 





Dofollowunit
by
Hoz


Description:
This is a simple sqf script to have one unit follow another unit.
This script is useful if you want 1 unit to follow another without having them in the same group.


Usage:
dummy = [Follower,UnitLeader] execVM DoFollowUnit.sqf
Follower is the unit that will track the leader
UnitLeader is the unit the Follower will run behind.

Run the radio trigger Alpha to have the follower run behind the leader or run the radio trigger bravo to test the group follow.
Run backwards turning left or right to watch for the unit track the leader.

Also see included example mission.


Features:
* If either unit dies the script will exit.
* If the variable Hoz_ReleaseUnit is set to false the script will exit.
* If the follower exceeds the distance set by _Hoz_LongDist (defautl 150) then the unit will wait until the leader is closer

*Note when using the group script it takes some time for the AI to catch up.


Credits:
Original Code borrowed from BadAss @ [Mapfact.net] added to a demo missionette to show how its done.


Version:
v.4
- Added the ability for the AI to get lost

V.3
- Added a break loop variable

v.2
- Added the ability for AI to follow into vehicle


Forum topic:
- OFPEC.com forums




Enable javascript to be able to download from Armaholic please!



Tags: No tags