INFO_CONTACT_STRING(Integer info_level)
INFO_SCAN_STRING(Integer scanner_contact)
EV_NEW_CONTACT(Integer contact)*
EV_CONTACT_LOST(Integer contact)*
EV_INSIDE_CRITICAL(Integer contact)*
EV_OUTSIDE_CRITICAL(Integer contact)*
Notes:
* Triggered only on objects with the EV_DRIVEN flag.
INFO_CONTACT_STRING is not a typical event. It is evaluated, and is expected to return contact information based on the info_level, which is a number from 1 to 5. The highest level, 5, would return a string such as "USS Lafayette -- Federation Antietam-class Heavy Cruiser". Level 3 might return "Federation Heavy Cruiser", while 1 and 2 might return simply "Heavy Cruiser".
INFO_SCAN_STRING is called to return information from scanning an object that is not a ship.
EV_INSIDE_CRITICAL and EV_OUTSIDE_CRITICAL are triggered on objects when a contact enters their cricital range, as defined by the configuration parameter CF_CRITICAL_RANGE.
Example:
A spherical nebula with 15000 units in radius, noticable from a range of 10000 units could be set up with a sensor range of 25000, and a critical range of 15000, plus the EV_DRIVEN, NEARSIGHTED, CAN_SENSE and INVISIBLE flags. EV_NEW_CONTACT could inform the ship's navigator that a nebula was on sensors in a particular direction. EV_INSIDE_CRITICAL could then set the ship HAZY and CATARACTS, to both impair the ship's sensors, and make it difficult for other ships to see it. EV_OUTSIDE_CRITICAL could reset these flags. (INVISIBLE would need to be set so that the nebula wouldn't show up as a normal contact.)
You could also code a wormhole similarly, but instead of setting HAZY and CATARACTS, the approaching ship could be set INVISIBLE, and MANUAL_DIRECTION, then the new super-fast speed and heading could be coded in MOVE_HEAD_BEARING, MOVE_HEAD_ELEV, and MOVE_SPEED. Of course, it would be nice if these attributes ensured that the ship also came out of the wormhole.