Jump to content
Sign in to follow this  
Jack Hammersmith

How to kill only infantry units

Recommended Posts

can someone say me a way to detect only infantry units of ofp in MP?

i want to create an area which will setdamage only to infantry units which are walking through it

problem is that i havent found any commands to detect "only infantry" so my scripts are killing tank crew etc. too

please can someone help me out with this?

Share this post


Link to post
Share on other sites

You can check whether infantry is not inside a vehicle and then kill it:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

? vehicle _unit == _unit: _unit setDammage 1.0

Share this post


Link to post
Share on other sites

Or you can use this from official comref to check units in

your triggerlist for their type:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">typeName countType array

Operand types:

typeName: String

array: Array

Type of returned value:

Number

Description:

Count how many vehicles in the array are of given type. For type see CfgVehicles.

Example:

"Tank" countType list triggerOne

Off course in your case you replace "Tank" by "Man" wink_o.gif

~S~ CD

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  

×