Jump to content
Sign in to follow this  
james mckenzie-smith

Making a trigger detect a mine

Recommended Posts

Hi All,

I am trying to have a trigger detect mines. I am attaching the trigger to a mobile unit, and I would like it to then be able to detect any mine as the unit moves. Now, it is easy enough to have the trigger detect a specific mine; one just groups it to the trigger, and when the mine is within the trigger radius, it gets detected. However, I cannot figure out how to make the trigger detect any mine, or any mine of a specific class; there is no trigger activation condition that seems to allow the detection of mines.

Can anyone point me in the right direction here? Thanks!

Share this post


Link to post
Share on other sites

Well I'd use isKindOf or nearEntities and check if the superclass of the objects near the player is that of a mine.

The Condition of your trigger could look like this:

count ((position player) nearEntities ["Mine", 50]) > 0

This will trigger when there is an object which is a subclass of "Mine" within an area of 50 meters.

But I'm not sure if "Mine" alone will suffice, because there seems to be several entries of "Mine" in the config, like one in cfgWeapons and one another in cfgVehicles.

Maybe a more experienced user can give you a hint where to look in the config.

Share this post


Link to post
Share on other sites

Thank you for your assitance. That did not work for me, but I got around the problem by attaching the triggers to the mines, and having them detect the players instead! That worked fine.

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  

×