-
Notifications
You must be signed in to change notification settings - Fork 90
set_named_entity_prop
Ryzom Core Wiki edited this page Jul 8, 2024
·
5 revisions
title: Set Named Entity Prop description: published: true date: 2023-03-16T23:11:08.029Z tags: editor: markdown dateCreated: 2023-03-16T22:28:49.676Z
The setNamedEntityProp and setNamedEntityPropCb native AI script functions are used to set a property of an existing named entity. Valid property names are "state", "param1", and "param2". The name of the entity cannot be changed.
The difference between the two functions is that setNamedEntityPropCb triggers listeners associated with the entity property, while setNamedEntityProp does not.
()setNamedEntityProp(name: s, prop: s, content: s) // setNamedEntityProp_sss_
()setNamedEntityPropCb(name: s, prop: s, content: s) // setNamedEntityPropCb_sss_
- name (string): The name of the named entity to modify.
- prop (string): The property of the named entity to modify.
- content (string): The value to set.
()setNamedEntityProp("Invasion", "state", "Active");
()setNamedEntityPropCb("Invasion", "state", "Active");
These examples set the "state" property of the "Invasion" named entity to "Active". The first example uses setNamedEntityProp, while the second uses setNamedEntityPropCb to trigger any listeners associated with the "state" property.