OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: CR_Elson on 26 Apr 2005, 17:04:36

Title: Getting the enemy to hunt you down
Post by: CR_Elson on 26 Apr 2005, 17:04:36
i need a script for my college course that will enable the enemy to get the position of the player say every 30secs or so and follow them
can anybody help me.
Title: Re:Getting the enemy to hunt you down
Post by: RujiK on 26 Apr 2005, 18:26:06
Very easy.

Code: [Select]
_Guy = _this select 0

#loop
_Guy domove getpos player
~30
?(Alive _Guy):goto"Loop"
exit
Title: Re:Getting the enemy to hunt you down
Post by: CR_Elson on 26 Apr 2005, 20:06:02
cheers thanks man
Title: Re:Getting the enemy to hunt you down
Post by: General Barron on 26 Apr 2005, 23:11:19
Here is a script that is a little more realistic, in that the enemy doesn't automatically know exactly where you are:

http://www.ofpec.com/editors/resource_view.php?id=692