Macser_old 0 Posted September 29, 2007 Hello, I only recently noticed that the incomingMissile EH only responds to "dumbfire" rounds like the RPG, when fired by an AI unit.Whereas the player has to lock on to the target with a guided type. Anybody know of a way around this? It's for the Vix_Stryker update,and the EH activates a small script to counter RPGs specifically.As I said,it's fine with the AI, but as a player it simply won't execute. Could it be specified in the Incoming Eh line within the config? Any help would be greatly appreciated. Macser. Share this post Link to post Share on other sites
sanctuary 19 Posted October 1, 2007 Here is a script i made for some battles i setup in the mission editor, trying to see if it would be more interesting than those dreaded eventhandlers (as addons built-in eventhandlers will always break mission eventhandlers of the same kind). You can use it in an init EH as a workaround for the incomingMissile one that is not working correctly with human players. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_veh = _this select 0 #loo _objchk = (NearestObject [_veh, "RPG"]) ~0.1 ? (_veh distance _objchk <= 50) : goto "oops" ~0.1 ?!(alive _veh) : goto "end" goto "loo" #oops deletevehicle _objchk boooom = "Shell73" createvehicle [(getpos _veh select 0), (getpos _veh select 1), 0] goto "loo" #end exit performance wise it seemed good enough, and because the loop is not too quick , sometime the missile is not intercepted by the script and the RPG hit the target fully instead of being replaced by the weaker shell73 (so no need of an artificial random failure built in the script). and the Shell73 despite being weak, is damaging the vehicle, so even if by an insane luck factor in a specific game the script intercept -every- RPG, the vehicle will be damaged anyways (a BIS M113 should be able to resist 2 hits from a Shell73 before the crew bail out automatically). i believe with an array of possible missiles instead of only the RPG that is in my script, you should be able to detect more missiles without having to use an incomingMissile eventhandler . But it would then have to be put in the init eventhandler of your addon. No idea -if- and -how- is working the NearestObject command in multiplayer. So no guarantee that this script is MP compatible. Share this post Link to post Share on other sites
Macser_old 0 Posted October 1, 2007 Hey Sanc, I should've asked you first. We'll give it a go and see how it works out. It'd be nice to have MP compatability,but atm I'd settle for single play.If only to get the addon released a little quicker. Thanks for the reply my friend. Macser. Share this post Link to post Share on other sites
Lamentin 0 Posted October 1, 2007 An array of possible missile types would be feasible if the Stryker is part of MOD, and not intended to be used outside the MOD. There are too many "RPG" type weapons out there to check for all of them every 1/100 of a second. Share this post Link to post Share on other sites