Author: Mr-Murray
Author Website: http://www.mr-murray.de.vu

Requirements: No addons required

Version: 1.0

Short description:

Date: 2007-05-12 19:55


Comments: (0)
Rating:



 

Searchlight Example
by
Mr-Murray


Description:
With this Editorexample I show you how you can make the searchlights usable by the AI.

This script was designed in such a way that one therein in each case the left and right border with azimuth value independently can determine. The AI will then move the searchlight only from the left to the right border and back. I used here two scripts for 2 searchlights, since you can specify every one individually. Let's take a closer look to the scripts:

Unit:
Guard1

Borders:
_left - left border
_right - right border
Here you enter the respective azimuth values, which you can read off in the editor with the unit. Comma values are not taken, but are rounded up or down.


searchlight.sqs
-------------------------------------------------------
; Skript by Mr-Murray 2006
; www.mapfact.net
; www.mr-murray.de.vu


_wache = Guard1
_Wache setformdir 26
_richtung = (getdir _wache)
_left = 26
_right = 128

#Start
? !(alive Guard1) : exit
~0.5
_richtung = _richtung +1
_wache setformdir _richtung
?(_richtung > _right) : goto "Next"
goto "Start"

#Next
? !(alive Guard1) : exit
~0.5
_richtung = _richtung -1
_wache setformdir _richtung
?(_richtung < _left) : goto "Start"
goto "Next"
-------------------------------------------------------


Usage:
-----
You can copy & paste this example very easy into your existing mission.
Or you can use the "Merge" option in the editor and import this example into your mission.
Then of course you must copy the two script examples from the example folder to your mission folder:
    3 Files:
    * Init.sqs
    * searchlight.sqs
    * searchlight2.sqs


Have fun with the searchlights wishes Mr-Murray!

www.mr-murray.de.vu
www.mapfact.net

Translation by W0lle




Enable javascript to be able to download from Armaholic please!



Tags: No tags