setTriggerArea – Talk

From Bohemia Interactive Community
Revision as of 22:47, 9 January 2009 by Planck (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

I note that the description for this has been edited to read: The area is rectangular or elliptic, the width is a, the height is b

Instead of the original description by BI of: The area is rectangular or elliptic, the width is 2*a, the height is 2*b

The original description is valid and can easily be checked. If you give the trigger dimensions in the editor of 50 X 50, this refers to the radius, so the trigger will have a diameter of 100. This applies whether it is an ellipse or a rectangle.

Planck 20:47, 8 January 2009 (CET)

I guess it's a matter of how you define "width" or "height"...
Is it the actual dimensions of the area, or just the name of the argument?
Since both definitions are valid interpretations, I've tried to clarify the parameters a bit now.
Hopefully everybody's happy now... --Kronzky 22:31, 8 January 2009 (CET)
Wonderfull, is much clearer now for anyone to understand, good job.
Planck 23:36, 8 January 2009 (CET)

I just verified the first 2 parameters of this command and it seems they are the total width (x-axis, west/east) and total height (y-axis, south/north) of the trigger area. To make a simple test place a marker with 100/100 dimensions then in a script create the trigger and call setTriggerArea command with first 2 parameters 100 and 100 (and also at same position as marker) then put a soldier out of the marker area and then try to walk in the marker, then put whatever you want in the trigger to notify you when you get in the trigger area.

Well, I'd like to try that, but, every time I create a marker with dimensions of 100 X 100 it covers the whole map.
Planck 15:06, 9 January 2009 (CET)
Well, the marker size uses the "radius" for dimensioning as well, so it only makes sense that it ends up covering the same area. Here's a demo showing that the size specified via the command covers the same area as an editor-created trigger (both being twice as big as specified by the "radius"): http://www.kronzky.info/misc/setTriggerArea.Intro.zip --Kronzky 15:24, 9 January 2009 (CET)
Aye, 'twas my mistake there, I was using the marker icons and they ended up covering the whole map using a size of 100X100 :P
Yes the markers are the same, a size of 100X100 gives an area of 200X200
Planck 22:47, 9 January 2009 (CET)