Home   Help Search Login Register  

Author Topic: Unit/vehicle tracking marker.  (Read 1573 times)

0 Members and 1 Guest are viewing this topic.

Offline snakedoctor

  • Members
  • *
    • Armed Assault Türkiye (Turkish Arma community)
Unit/vehicle tracking marker.
« on: 31 Oct 2009, 15:01:50 »
i found this script with search function and it seems work fine.What i want is when the vehicle damaged change the marker type and of course when its get repaired marker turns default.There are some scripts in forum but they are all old sqs.Need you help..

Code: [Select]
_marker = _this select 0;
_vehicle = _this select 1;

while {alive _vehicle} do
  {
  _marker setmarkerpos getpos _vehicle;
  sleep 1;
  };
my native language is not English, so forgive me if I make some mistakes.

http://www.armedassault-turkiye.net/

Offline Shuko

  • Members
  • *
Re: Unit/vehicle tracking marker.
« Reply #1 on: 31 Oct 2009, 17:43:24 »
Check the damage and setmarkertype accordingly.

Offline tcp

  • Members
  • *
    • Violator Gaming
Re: Unit/vehicle tracking marker.
« Reply #2 on: 31 Oct 2009, 18:43:57 »
You probably want run it on locally on clients only and use local markers, to save the server from some processing. Also, there are so many examples of this already, you really should search around.

Offline snakedoctor

  • Members
  • *
    • Armed Assault Türkiye (Turkish Arma community)
Re: Unit/vehicle tracking marker.
« Reply #3 on: 31 Oct 2009, 20:41:53 »
Found lot of examples, but they are all .sqs from ofp times.Thie sqf ones dont have damage system...
my native language is not English, so forgive me if I make some mistakes.

http://www.armedassault-turkiye.net/

Offline mikey

  • Former Staff
  • ****
  • Whitespace Whore
Re: Unit/vehicle tracking marker.
« Reply #4 on: 02 Nov 2009, 13:34:57 »
Untested:

Code: [Select]

_marker = _this select 0;
_vehicle = _this select 1;

while { alive _vehicle } do
{
_markerType = if ( (damage _vehicle) > 0 ) then{ "n_maint" } else { "vehicle" };
_marker setMarkerTypeLocal _markerType;
_marker setMarkerPosLocal (getpos _vehicle);

sleep 1;
};

I also made this a script that uses local effect commands now, so you need to execute the script on every client.
« Last Edit: 02 Nov 2009, 13:38:46 by mikey »