Jump to content
Skull_Army

Making markers appear on destroyed vehicles (resolved)

Recommended Posts

I have some empty vehicles on a map, when they get destroyed I want to have a marker appear on their position (marking them as destroyed). I'm naming the vehicles and placing a trigger on their positions with this inside the triggers

Con: !Alive "vehicle name"

On Act: marker = createMarker ["Destroyed",getpos "vehicle name"];marker setmarkertype "Mil_warning"; marker setMarkerColor "ColorBlue"; marker setmarkertext "Vehicle Destroyed";


It works but only for the first destroyed vehicle, after that it won't do it for the others

any ideas?
____________________________________________

EDIT: RESOLVED!

Putting this in the vehicle init works

[this] spawn { params ["_vehicle"]; if !isServer exitwith {}; waitUntil {!alive _vehicle}; private _marker = createMarker [format ["destroyed_%1", random 1000], getPos _vehicle]; _marker setMarkerType "Mil_warning"; _marker setMarkerColor "ColorBlue"; _marker setMarkerText "Vehicle Destroyed"; };

credit to Freddo

Share this post


Link to post
Share on other sites
20 minutes ago, Skull_Army said:


Con: !Alive "vehicle name"

This will produce syntax error so no idea what "It works"

Share this post


Link to post
Share on other sites

I get no error, but it does work, when the first vehicle gets destroyed the marker appears but the 2nd, 3rd, 4th etc do nothing

Share this post


Link to post
Share on other sites

could u try to write code and not lines of dense plain text? Also usage of code button (<>) is allowed in this forum as well.


I did it for you this time:

[this] spawn 
{ 
 params ["_vehicle"]; 
 if !isServer exitwith {}; 

 waitUntil { !alive _vehicle }; 

 private _marker = createMarker [format ["destroyed_%1", random 1000], getPos _vehicle]; 
 _marker setMarkerType "Mil_warning"; 
 _marker setMarkerColor "ColorBlue"; 
 _marker setMarkerText "Vehicle Destroyed"; 
}; 

uhh, nice. I can read it now :-)

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×