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
Money 0 Posted June 19, 2007 Moving to mission editing and scripting Understandable It'd be nice to see a future realism mod incorporate the idea of this script. I agree with the whole iron-sight on = hit and the hand shaky thing. All that needs doing now is wind conditions Good work Celery & contributors . Share this post Link to post Share on other sites
quiet_man 8 Posted June 19, 2007 awww... I missed the original purpose of the script, then.Well, imho, OFP waypoints were easy-to-hit laser-like weapons, with far too much accuracy at range. They felt like paper in your hands, with far too much spray & pray capabilities But that's what it is : an opinion not only you, I still don't understand what it is for does this remove the effects of handshake? So you can snipe >500m while walking? with pure Arma I can take any weapon, run a while, kneel down, aim, wait 3 Seconds and snipe up to 500m and more even during the short time of handshake the bullets go exactly where the weapon points at, this seams to me very realistic and I don't see how this script changes anything? maybe this was for an older version, but with 1.08 there is no random dispersion, I even find it a little to easy to do far distance shoots. Interesting would be to use it to simulate sight adjustment QuietMan Share this post Link to post Share on other sites
celery 8 Posted June 20, 2007 awww... I missed the original purpose of the script, then.Well, imho, OFP waypoints were easy-to-hit laser-like weapons, with far too much accuracy at range. They felt like paper in your hands, with far too much spray & pray capabilities But that's what it is : an opinion not only you, I still don't understand what it is for does this remove the effects of handshake? So you can snipe >500m while walking? The demo mission is still there in the first post, you can try the effects yourself. "Handshake" is not removed, the dispersion is, so assuming that the soldier has the sights centered on the target, the bullet flies that way instead of going half degrees to a random direction. It's true that 1.08 made some rifles more accurate, but you can experience the dispersion I want to remove first hand in ACOG rifles, AK74 PSO and especially the pistols which are utterly useless in their vanilla form. Share this post Link to post Share on other sites