OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: BronzeEagle on 25 Apr 2004, 17:10:48
-
wouldn't it be cool to have a homing beacon script?
-
Well... have a marker and setpos it where you want the beacon to be. if the player "Switches off" the beacon (using radio or action menu), simply move the marker away (0,0,0) and setpos it back if the radio is reactivated.
If the beacon was to be attached to a vehicle, have a script looping every 1 or 2 seconds and setpos the marker accordingly.
Cheers
PiLLe
-
I did something like this for fun. I will try to attach it.
The ZIP should (*g*) be attached to the post above.
ZIP should be unpacked to "users/yourname/homingbeacon.eden" and the pbo here to "missions" (SP Mission FoldeR), with the current folder being your ofp-directory.
Cheers
PiLLe
-
If you were talking about, lets say, a "hint" giving you the current direction to your target, tell me and ill try to do that as well... but tomorrow ;)
Cheers and gn8
PiLLe
-
If I remember right, Devichaser had something like this in "Firelord" and Toadlife had some kind of tracer beacon in "Lojack." You should probably as them, if you can get in touch with them.
-
now i hope i uderstood it correctly....a "homing Beacon" shows you where someone is on the map, right?
If this is correct, this little script could help you for a start. If i'm wrong....ignore this post ;D
?(side player == WEST): goto "trace"
exit
#trace
"civ0marker" setMarkerType "Destroy"
#loop
~5
?(civ0wanted == 0): goto "end"
_pos = getpos civ0
"civ0marker" setmarkerpos _pos
goto "loop"
#end
"civ0marker" setmarkertype "Empty"
"civ0marker" setmarkerpos [0,0]
exit
Explanations:
?(side player == WEST): goto "trace"
exit
i want only WEST units can see these markers....
"civ0marker" setMarkerType "Destroy"
as the marker is type "empty" at mission start, i have to make it visible.
?(civ0wanted == 0): goto "end"
at certain circumstances it doesn't need the marker any longer...so check this variable
_pos = getpos civ0
"civ0marker" setmarkerpos _pos
gets the pos of the unit and places the marker....this section is looped with a 5 sec delay...so pos is actualised every 5 secs...you can make this shorter or longer
"civ0marker" setmarkertype "Empty"
"civ0marker" setmarkerpos [0,0]
as the marker isn't needed for the moment, i switch it back to type "empty" and move it out of the map to a far corner.