Warzone does not process the event handler's return value.
Notes
The event is throttled, meaning that it won't get triggered for all newly detected objects, just some of them.
If you want to get a list of all droids that are currently visible, use enumDroid().
Example
Filter seen objects by type
function eventObjectSeen(sensor, gameObject) {
switch (gameObject.type) {
case STRUCTURE: {
if (!allianceExistsBetween(me,gameObject.player)) {
console(sensor.name+" spotted an enemy structure: "+gameObject.name);
}
}
case DROID: {
if (!allianceExistsBetween(me,gameObject.player)) {
console(sensor.name+" spotted an enemy droid: "+gameObject.name);
}
}
case FEATURE: {
console(sensor.name+" spotted a "+gameObject.name);
}
}
}
Currently this event only reports objects spotted by your sensors. It does not get triggered when allies spot something.
Availability 3.1 B2+
Requires:
Warzone 3.1 Beta 2 or above
Contents
Jump to:
See also
Related articles:
enumBlips() – get a list of enemy sensor and ECM structures that your Radar Detector has seen
enumDroid() – can be used to get a list of droids that you or your allies can see
enumFeature() – can be used to get a list of features that you or your allies can see
enumStruct() – can be used to get a list of structures that you or your allies can see