OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Resources Beta Testing & Submission => Topic started by: Blanco on 03 Jun 2007, 18:41:34

Title: Searchlight Betascript (OBSOLETE)
Post by: Blanco on 03 Jun 2007, 18:41:34
Hi, I improved my searchlight script.

In this version the searchlight operator can spot you when you run through the lightbeam and when he does, he will follow you whereever you are.
You can avoid detection when you go prone and stay still but only when you're farther then 50m away and closer then 200m from the searchlight.
When you're farther then 200m away, the operator will stop following you and continue his search routine. When you're closer then 50m, the operator will always spot you when he sees you running, walking, crawling,...in the lightbeam.
The spot stays on when the operator dies, but it wont move anymore. The spot turns out when you destroy the lens.

When you're spotted a bolean "sldetected" become true. Via this bolean you can send reinforcements, reveal the position to the enemy, sync it with a sniper... and so on.
 

Things to do (if I can)
- Predifined search arc
- I need a line of sight script/function, because the operator can still spot and follow you when you're hiding behind a large building, tree or any other object. I 've already started a topic (http://www.ofpec.com/forum/index.php?topic=29483.0) about this problem
- sqf conversion and simplified code.

If you like the idea and script, feel free to modify.
Demo mission below, no addons needed.

Edit: second demo added, basically the same script but with...

..better code (many thx to Mandoble)
..and synced with a sniper.


See LCD's update.  (http://www.ofpec.com/forum/index.php?topic=30901.0)




   
 

 
Title: Re: Searchlight Betascript
Post by: The-Architect on 11 Jun 2007, 16:39:39
You might want to consider changing the detected to something else more obscure.

I don't know about others but I use detected very frequently as a condition. Mind you, if it's just me then I can just change it myself.  :yes:
Title: Re: Searchlight Betascript
Post by: Blanco on 16 Jun 2007, 14:55:55
Good point, I changed it in sldetected and made a few adjustments because I've noticed I uploaded an old version.  :-[
Opening post was modified. Old SLS mission was removed and replaced with a new version. (still needs work, no LOS script inside)
Title: Re: Searchlight Betascript
Post by: LCD on 27 Aug 2007, 17:50:29
ny chance u cud update dis 2 work with units oder dan da player ?

it cud b very useful 4 my next mision  :D

nywyaz... i love da script  :good:

LCD OUT

[edit]
btw... heres a rough idea 4 da line of sight thingy (wud work w/ buildings... wont work 4 trees...) u cud use da nearestobject commands 2 get all objectsdat r nearer 2 da searchlight dan da player  (use house and ruins base classes 4 da nearestobject)... 2nd phase wud b 2 write a function 2 check if da building is between player nd da searchlight(probably mandoble cud write it or somion like dat :P or ny1 dat is beter in maths dan i am  ::))

hope i made da idea clear enough :D