OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Resources Beta Testing & Submission => Topic started by: Platoon Patton on 15 Oct 2005, 15:10:13

Title: Radar\Sonar\Scanner
Post by: Platoon Patton on 15 Oct 2005, 15:10:13
PPP_Radar.sqs

What?
Its a simulation of a Radar\Sonar\Scanner with markers.

How to activate?
[Object1,Object2,(Sound)True/False] exec "PPP_Radar.sqs"
Object1=Center of the Radar
Object2=Target to find
(Sound) True/False:U want the Radar beep or not
Example:[Player,NearestObject [player,"civilian"],True]exec "PPP_Radar.sqs"

Where to use?
--The demomission is a visual presentation of the NearestObject Command.
Range radar=50m,it shows the nearest civilian.
--Radar centre can be the player,or OnMapSingleClick,or any object
--In cutscenes,with mapanimations.
--In Night COOP missions,the Radarsound activates when the radar found someone.
--In MP games,showing the position of enemy Flagrunners.
--donno,you tell me ...

As I am not the greatest math specialist I am sure somebody will see a shorter\better way of scripting in PPP_Radar.sqs,all suggestions wellcome :)



Title: Re:Radar\Sonar\Scanner
Post by: Platoon Patton on 15 Oct 2005, 22:13:04
Updated Version:

Support for 3 Objects.

Activation:
[Object1,[Objects to find array(Max3)],(Sound)True/False] exec "PPP_Radar.sqs"

The Radar is 10x bigger,Range = 500m,Attached to player who is gunner in Cobra.
Searches for Tank,Jeep,Man.
Title: Re:Radar\Sonar\Scanner
Post by: Blanco on 16 Oct 2005, 04:07:36
Very neat!

It's a pity you can't create markers in OFP...  :(



Title: Re:Radar\Sonar\Scanner
Post by: Terox on 16 Oct 2005, 20:46:46
well what you can do is have a mission maker create  an X number of empty markers, say 10 and have the radar only pick up 10 units / vehicles


radar system would be far better for vehicles, especially aircraft, to do a unit tracking system, simply setpos a marker to a units position depending on what conditions you want to add

eg global array of all units

unit distance radar < 30
unitmarker setmarkertype "notempty"
unitmarker setmarkerpos getpos unit etc etc


Also, Patton i have some ready made markers which are side silhouettes of just about every OFP vehicle going even down to the tractor and the bus
I have  created them especially for a unit tracking system in a mod i am involved with and they are of a nice small enough size not to clog up the map screen
 I have been thinking of releasing them as a standalone addon with an example unit tracking mission to accompany them
70 + markers in all

if you think they are of use to you let me know and i will send you a preview