IMM_DETACH
Keywords: IMM_DETACH, WIZ_DETACH
=== STAFF MANUAL ===
Usage: detach room <trigger | all>
detach <target> <trigger | all>
detach mob <target> <trigger>
detach object <target> <trigger>
Description:
Remove a trigger script from a live mob, object, or room.
Use detach to clean up attachments that you (or a reset)
added via attach, to back out a bad hot-patch, or to pare
down an entity that has accumulated too many runtime
triggers.
Forms:
detach room <trigger> ..... Remove a trigger from the room
you are currently standing in,
matched by name.
detach room all ........... Remove every trigger from the
current room.
detach <target> <trig> .... Smart-target form. target is
resolved against your equipment,
your inventory, characters and
objects in your current room,
and finally against characters
and objects anywhere in the
world (first match wins).
trig may be a script name or
the literal word all.
detach mob <name> <trig> .. Explicit mob form. Looks up
a character by name and removes
the named trigger.
detach object <name> <t> .. Explicit object form. Looks
up an object by name and removes
the named trigger.
Output:
On success, the invoker sees:
Trigger removed.
For the all variants the confirmation depends on the
target:
All triggers removed from room.
All triggers removed from <mob>.
All triggers removed from <obj>.
Common failure messages:
That trigger was not found.
No such mobile around.
No such object around.
Nothing around by that name.
You must specify a trigger to remove.
Restrictions:
- Requires the Script staff permission.
- Both arguments are required. An incomplete command
prints:
"Usage: detach [ mob | object ] { target } { trigger
| 'all' }"
- The all keyword only removes triggers reliably on
the room form and on the smart-target form. For mob
or object targets, prefer the smart-target form when
you want to wipe every trigger, since that is the
code path all is wired through.
Notes:
- detach only operates on live-instance triggers. It
does not remove triggers that are part of a mob or
object prototype -- for those, edit the prototype's
trigger list in medit / oedit or add a
TRIG_DELETED flag via delete trigger.
- After a zone reset or reboot, any triggers attached
to prototype-reset entities are reapplied, so a
detach made during play may be silently undone by the
next reset of that zone.
- Use sstat on the target if you need to list the
triggers currently attached before picking which one
to remove.
Related Helpfiles: WIZ_ATTACH, WIZ_VATTACHED
=== END MANUAL ===