An event that's triggered when a droid first enters a labelled Area object...
Syntax
// see important notes about event name and usage below!
function eventArea<LABEL>(droid) {
// do stuff
}
Parameters & References
Parameter
Type
Mandatory
Description
Game version
<LABEL>
String
The name of the label, which is always in uppercase, is appended to the event name.
For clarification, there is no "eventArea()" event, only variations of that event name that include a label. For example, if there is an Area object with label "FOO", the event when a droid first enters that area will be called "eventAreaFOO()".
Note: The event only triggers once when a droid first enters it. If you want the event to trigger again in the future, you'll need to reset the area trigger using the resetArea() function.
Return value
Warzone does not process the event handler's return value.
Notes
You can define areas inside maps via the labels.ini file.
Example
Work out who our main aggressors are
// assuming we've labelled an area FOO
function eventAreaFOO(droid) {
// let's reset the area
resetArea("FOO"); // event will get fired next time a droid enters
}