del_named_entity_listener - ryzom/ryzomcore GitHub Wiki


title: Delete Named Entity Listener description: published: true date: 2023-03-12T16:50:07.989Z tags: editor: markdown dateCreated: 2023-03-12T16:50:05.052Z

delNamedEntityListener

The delNamedEntityListener native AI script function removes a listener from a named entity property. If several listeners with the same parameters are registered, only one is removed.

Syntax

()delNamedEntityListener(name: s, prop: s, event: f) // delNamedEntityListener_ssf_
()delNamedEntityListener(name: s, prop: s, cbFunc: s) // delNamedEntityListener_sss_

Arguments

  • name (string): The name of the named entity to remove the listener from.
  • prop (string): The property of the named entity to remove the listener from.

()delNamedEntityListener(s, s, f)

  • event (float): The user event to stop triggering when the named entity property changes.

()delNamedEntityListener(s, s, s)

  • cbFunc (string): The name of the script function to stop calling when the named entity property changes.

Example

Remove a user event listener

()delNamedEntityListener("Invasion", "state", 6);

This example code removes a listener with user event 6 associated with the named entity "Invasion" and the property "state".

Remove a script function listener

()delNamedEntityListener("Invasion", "state", "onStateChange");

This example code removes a listener with the script function "onStateChange" associated with the named entity "Invasion" and the property "state".

⚠️ **GitHub.com Fallback** ⚠️