Jump to content
Sign in to follow this  
Ruckus

How to place a trigger around a building

Recommended Posts

Hi, I have a building that is generated by a script and in that script, I want to place a trigger that encompasses the building so when I walk up to it I can fire another script.

I have been able to place the trigger without any problem using bounding box to get the size of the building. I am also able to get it to fire off my script, however the center of the trigger and the center of the building do not seem to be the same. I assume that the model origin is not always the center of the model.

Is there any way to get the trigger to center itself around the

building? I thought just placeing the trigger at the position of the building and using bounding box to get the size would be enough.

Share this post


Link to post
Share on other sites

Ya, hit preview and see when the trigger goes off. Then resize it till you have what you want.

Share this post


Link to post
Share on other sites
Ya, hit preview and see when the trigger goes off. Then resize it till you have what you want.

yeah, I tried that first.  I am able to place the trigger without any problem. The problem I have is that there is a larger

trigger area on one side vs the other.  This I believe is because the models origin is not nessessarly in the center

of the model, while the trigger placement is using the center of its area.

Unless anyone knows a better way,  I'll have to add a offset

to the position of the model or the trigger on the map to correct the problem.

Share this post


Link to post
Share on other sites
Quote[/b] ]This I believe is because the models origin is not nessessarly in the center

of the model, while the trigger placement is using the center of its area.

Yeah, it could either be centred arounds the Geo LOD's mass distribution or how it was positioned in O2. It all depends on the config settings for Autocentre.

Quote[/b] ]Unless anyone knows a better way

If you really want to avoid using predefined offsets. Then seen as you know the dimensions and position, you could use the intersect command, to search for any two sides that form a corner.

Plotting a cross (two lines that pass through the objects X & Y position at 90 degrees to each other) using the intersect command would give you your offsets.

Share this post


Link to post
Share on other sites
Quote[/b] ]This I believe is because the models origin is not nessessarly in the center

of the model, while the trigger placement is using the center of its area.

Yeah, it could either be centred arounds the Geo LOD's mass distribution or how it was positioned in O2. It all depends on the config settings for Autocentre.

Quote[/b] ]Unless anyone knows a better way

If you really want to avoid using predefined offsets. Then seen as you know the dimensions and position, you could use the intersect command, to search for any two sides that form a corner.

Plotting a cross (two lines that pass through the objects X & Y position at 90 degrees to each other) using the intersect command would give you your offsets.

Dam....Thanks UNN. I knew someone would have a better way smile_o.gif I'll give that a shot.

Share this post


Link to post
Share on other sites
Quote[/b] ]I'll give that a shot

I must admit I've never used the intersect command. So let us know how you get on.

Cheers

Share this post


Link to post
Share on other sites
Quote[/b] ]I'll give that a shot

I must admit I've never used the intersect command. So let us know how you get on.

Cheers

hahahh, either have I. I was going to play around with it. The wiki is not real clear so I figured I'd play around with it. I was going to search through some of the standard missions and some of the other functions and scripts that come in the game to see if that is used and mess about with it.

Share this post


Link to post
Share on other sites

Hmm..After re-reading the description in the Wiki, it looks as though I have mislead both of us sad_o.gif It's has nothing to do with where it intersects LOD's. It's used to return named selections, although I cant even get it to do that atm.

Share this post


Link to post
Share on other sites
Hmm..After re-reading the description in the Wiki, it looks as though I have mislead both of us sad_o.gif It's has nothing to do with where it intersects LOD's. It's used to return named selections, although I cant even get it to do that atm.

Not a problem.  I always seem to break new ground on all of my stuff hahahhah.   rofl.gif

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  

×