Home   Help Search Login Register  

Author Topic: homing beacon  (Read 522 times)

0 Members and 1 Guest are viewing this topic.

BronzeEagle

  • Guest
homing beacon
« on: 25 Apr 2004, 17:10:48 »
wouldn't it be cool to have a homing beacon script?  

csde-PiLLe

  • Guest
Re:homing beacon
« Reply #1 on: 25 Apr 2004, 19:21:03 »
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
« Last Edit: 25 Apr 2004, 20:06:45 by csde-PiLLe »

csde-PiLLe

  • Guest
Re:homing beacon
« Reply #2 on: 25 Apr 2004, 20:05:32 »
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
« Last Edit: 25 Apr 2004, 20:07:35 by csde-PiLLe »

csde-PiLLe

  • Guest
Re:homing beacon
« Reply #3 on: 25 Apr 2004, 20:08:34 »
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

Offline SEAL84

  • Members
  • *
  • Always lurking
Re:homing beacon
« Reply #4 on: 26 Apr 2004, 00:22:30 »
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.

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re:homing beacon
« Reply #5 on: 26 Apr 2004, 13:16:54 »
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

Code: [Select]
?(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:

Code: [Select]
?(side player == WEST): goto "trace"
exit

i want only WEST units can see these markers....

Code: [Select]
"civ0marker" setMarkerType "Destroy"
as the marker is type "empty" at mission start, i have to make it visible.

Code: [Select]
?(civ0wanted == 0): goto "end"
at certain circumstances it doesn't need the marker any longer...so check this variable

Code: [Select]
_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

Code: [Select]
"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.