Jump to content
Sign in to follow this  
schadler17

Detect if Empty Helis are in trigger

Recommended Posts

I'm looking to make a trigger that when an empty helicopter is present, it sets the vehicle damage to 0 while it is in the trigger area.(Basically vehicle invulnerability inside the trigger zone)

Anyone have ideas?

Share this post


Link to post
Share on other sites

Try this server side script:

_trigger = createTrigger ["EmptyDetector", _position];

_trigger setTriggerActivation ["ANY", "PRESENT", true];
_trigger setTriggerStatements [
	"({(_x isKindOf 'Helicopter_F') and {(count (crew _x)) == 0}} count thisList) > 0",
	"{if ((_x isKindOf 'Helicopter_F') and {(count (crew _x)) == 0}) then {_x setDamage 0}} forEach thisList",
	""
];

Share this post


Link to post
Share on other sites

For _position should I define that above? On iPad right now away from PC and can't test right now.

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  

×