C.98.  $world->triggerenabled

Abstract

$world->triggerenabled function: checks whether a TRIGGER is ENABLED

$result = $world->triggerenabled( name );
 
$result = $world->triggerenabled( number );
 

This function checks whether the specified trigger exists and whether it is enabled.

You can pass either a trigger number or name. If the trigger does not exist, this function returns undef, so you can distinguish the case of a non-existant trigger from a disabled one.

If the trigger exists, then the function returns 0 or 1 depending on whether it is enabled or not. If you pass a name, and there are several triggers with the same name, it returns a list with one value for each trigger with that name, and each value is 0 or 1 depending on the state of the trigger.