Jump to content
Sign in to follow this  
KrazySwede

Trigger vertical dimension/limit

Recommended Posts

Is it possible to set a vertical limit on a trigger's activation area? I'm trying to create a trigger that can be activated by ground units but not by an airplane flying through it at 500ft, for example.

I know I could check to see if the unit activating the trigger is in an airplane, but I'm wondering if there's anything that can be done to the trigger itself.

Thanks,

Marcus

Share this post


Link to post
Share on other sites

In Arma1, I was under the impression that height of trigger was somewhat dependent on width and length. I experienced that my planes wouldn't set off the trigger if they were too thin, and lowering speed didn't seem to help anything. I might be wrong though, and/or this could have changed with Arma2.

For your application though, I would try using "this && (isKindOf 'man' in thislist)" or something like that, in the condition field.

Share this post


Link to post
Share on other sites

Also can try:

this && ({(_x getPos select 2) > 2} count thisList) > 0

In the condition field of the trigger. Basically, it fires if the original trigger conditions are true and if there is at least 1 unit from the trigger list under 2m altitude. Depending on what your trigger is for, you might need to change that.

Share this post


Link to post
Share on other sites

I think the second approach is the way to go in terms of a work-around, since I still want units in ground vehicles to activate the trigger.

I am creating the trigger through an SQF script though, and not the editor, so I'm not sure how to add additional conditions that must be met before its activates.

As for the code you posted beita, if I'm not mistaken shouldn't that be ...(_x getPos select 2) < 2... in order to identify those under 2m? I also wonder if getPosATL should be used as opposed to getPos. I'm not sure where getPos measures from, but if getPosATL measures height from the terrain level, I can only imagine getPos does it differently. I'm just throwing ideas around though, and want to make sure I have all the details worked out :).

I can't do anything until I figure out how to implement multiple conditions on a trigger through scripting though. Does anyone know how that's done?

Thanks,

Marcus

Share this post


Link to post
Share on other sites

Thanks, Carl Gustaffa. I tried that method out in the editor and it works great, but (as far as I know) the means I have of manipulating a trigger's activation up when adding it via a script is the setTriggerActivation command. I'm not sure how I'd incorporate the aircraft check when adding the trigger by script.

Marcus

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  

×