Jump to content
Sign in to follow this  
alleycat

Adding mission eventhandlers fails with foreach

Recommended Posts

Attempted to draw icons for every player on the server:

	{
	addMissionEventHandler ["Draw3D", { drawIcon3D 
										[
											"\A3\ui_f\data\map\markers\military\dot_CA.paa",
											[1.0,1.0,1.0,0.4],
											[(getPosATL  _x select 0) ,(getPosATL  _x select 1), (getPosATL  _x select 2) +0],
											1.0, 1.0, 360,
											format["%1 %2m", name _x, floor (_x distance player)],
											0,
											0.03,
											"puristaMedium"
										]; }];


} foreach Allunits;

throws many errors. However using that setup on a single unit without the foreach does work. Am I not seeing the mistake or is it not possible to add drawicon handlers to anarray of things?

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
Sign in to follow this  

×