Jump to content
Sign in to follow this  
Toasticuss

Position a trigger inside a building in a specific place?

Recommended Posts

I'd like to position a trigger in a specific part of a building on the second floor, is this possible?

Share this post


Link to post
Share on other sites

According to this - http://community.bistudio.com/wiki/setPos - setpos on a trigger can be used to adjust the altitude of a trigger. So, figure out the appropriate size and x/y position for the trigger to match the part of the building you want to use, then use trial and error to figure out an appropriate z value.

Share this post


Link to post
Share on other sites
According to this - http://community.bistudio.com/wiki/setPos - setpos on a trigger can be used to adjust the altitude of a trigger. So, figure out the appropriate size and x/y position for the trigger to match the part of the building you want to use, then use trial and error to figure out an appropriate z value.

Thanks I didnt think triggers we're game objects so it would effect them.

Would I put it in the condition box or on activation?

Also how would I find the coordinates?

Edited by Toasticuss

Share this post


Link to post
Share on other sites

Even if you are able to change the height of the trigger, it will have no effect on the trigger's area, which is strictly a 2D detector. You need to use a different approach. Two methods come to mind:

1. Use the distance command. Will allow you to define a sphere, where the target object has to be inside this sphere.

Ex:

Trigger condition

{_X distance [i]centerPosition[/i] < [i]radius[/i]} count thislist > 0

Where centerPosition is an object in the center of your sphere (can be the trigger itself if you have setPosed to the correct height).

2. Check the height of all objects that are in the trigger area. Will create a cyllinder of specified height.

Ex:

{((getPosATL _X) select 2) > [i]minHeight[/i] && ((getPosATL _X) select 2) < [i]maxHeight[/i]} count thislist > 0

Where minHeight is (you guessed it) minimum height (above ground level) and maxHeight is maximum height of the object for it to activate the trigger.

Share this post


Link to post
Share on other sites
Even if you are able to change the height of the trigger, it will have no effect on the trigger's area, which is strictly a 2D detector. You need to use a different approach. Two methods come to mind:

1. Use the distance command. Will allow you to define a sphere, where the target object has to be inside this sphere.

Ex:

Trigger condition

{_X distance [i]centerPosition[/i] < [i]radius[/i]} count thislist > 0

Where centerPosition is an object in the center of your sphere (can be the trigger itself if you have setPosed to the correct height).

2. Check the height of all objects that are in the trigger area. Will create a cyllinder of specified height.

Ex:

{((getPosATL _X) select 2) > [i]minHeight[/i] && ((getPosATL _X) select 2) < [i]maxHeight[/i]} count thislist > 0

Where minHeight is (you guessed it) minimum height (above ground level) and maxHeight is maximum height of the object for it to activate the trigger.

Alright so that makes a little more sense but how do I check the height of all objects that are in the trigger area?

When trying to put this in my triggers condition

[code]{_X distance [i]centerPosition[/i] < [i]radius[/i]} count thislist > 0

[/code]

It says Type Bool, expected nothing.

Share this post


Link to post
Share on other sites

It says Type Bool, expected nothing.

Works for me on condition but not on activation make sure where you placed it.

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  

×