OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Multiplayer => Topic started by: snakedoctor 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..
_marker = _this select 0;
_vehicle = _this select 1;
while {alive _vehicle} do
{
_marker setmarkerpos getpos _vehicle;
sleep 1;
};
-
Check the damage and setmarkertype accordingly.
-
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.
-
Found lot of examples, but they are all .sqs from ofp times.Thie sqf ones dont have damage system...
-
Untested:
_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.