Jump to content
Sign in to follow this  
CaptainBravo

Activate trigger only if anyone is crouched or standing up

Recommended Posts

Hey everyone,

I am not sure how to do this but I want to activate a trigger with condition if anyone is crouched or standing up in the trigger area. If prone, then no detection. This activation is prone goes into crouch or standing position then trigger is activated.

How simple or complicated is this to do?

Thanks for your help.

Share this post


Link to post
Share on other sites

you can use the unitPos command to check what stance unit is in, but it will only work if a previous setUnitPos was issued acording to Wiki, VBS2 has what you want, a check for stance but that doesnt help you much.

I am sure ive seen stance checks work somewhere, just cant remember where or how.

Share this post


Link to post
Share on other sites

I have used boundingBox to check if a unit is prone.

If (((boundingBox _unit select 1) select 2) < 1) Then ...

Only limitation is that values for standing and crouch are the same. But if you only want to check if the unit is prone (or not prone for that matter) it should work.

Share this post


Link to post
Share on other sites

Thanks Clayman. I am not sure how the command in example _box = boundingBox _abrams can be used to check if a unit if standing, crouched or prone?

Any simple example?

Share this post


Link to post
Share on other sites

For example you could make a trigger. The activation condition could just be "Anybody Present" I guess.

In the "Condition" field below, put (((boundingBox yourUnitName select 1) select 2) < 1)

Then the trigger only fires if the unit is prone. It will not work with crouches though, and I guess there is no way to get it to (?)

You could make it "(this AND (((boundingBox yourUnitName select 1) select 2) < 1))" if you have a trigger Activation condition that must also be met (not just "anybody present" with no regard to where)

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  

×