Jump to content
Sign in to follow this  
Macser_old

Incoming EH and the player

Recommended Posts

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.

smile_o.gif

Share this post


Link to post
Share on other sites

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

Hey Sanc,

I should've asked you first. wink_o.gif

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.

smile_o.gif

Share this post


Link to post
Share on other sites

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×