setTriggerArea – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 19: Line 19:
::[[User:Planck|Planck]] 23:36, 8 January 2009 (CET)
::[[User:Planck|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 width (y-axis, south/north) of the trigger area.
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.
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.

Revision as of 13:16, 9 January 2009

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.