whisper 0 Posted June 19, 2007 Thanks Celery for the code snippet And thanks Sickboy for the invaluable coding tip Incidentally Celery, I wrote an eventhandler that I wanted applied to everything in the map, and the solution suggested to me was to make a huge trigger that covers everything, set it to Anybody, present, once and have something like this in the on activation: {_x addeventhandler ["killed", {[_this select 0, _this select 1] exec "myHandler.sqs"}]} foreach thislist; correcting for new knowledge from Sickboy this should give you some ideas about how to apply the eventhandler without using the init field for each unit. You can also use "nearObjects". I was using createTrigger before, but finally found out that nearObjects to be much faster to get a list of objects. Unless of course you have a special condition to meet for the units you want to detect, in which case changing the condition statement of the trigger accordingly is better. But for a simple "I need the list of all OPFOR soldiers 100m around here", I simply use a <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_position nearObjects ["SoldierEB", 100] Share this post Link to post Share on other sites
shadow 6 Posted June 19, 2007 Moving to mission editing and scripting Share this post Link to post Share on other sites