add_profile_parameter - ryzom/ryzomcore GitHub Wiki


title: Add Profile Parameter description: published: true date: 2023-03-13T03:50:51.599Z tags: editor: markdown dateCreated: 2023-03-13T03:50:47.128Z

addProfileParameter

The addProfileParameter native AI script function is used to add a profile parameter to the current group.

Syntax

()addProfileParameter(parameterName: s) // addProfileParameter_s_
()addProfileParameter(parameterName: s, parameterContent: s) // addProfileParameter_ss_
()addProfileParameter(parameterName: s, parameterContent: f) // addProfileParameter_sf_

Arguments

  • parameterName (string): The id of the parameter to add.
  • parameterContent (string|float, optional): The value of the parameter.

Examples

()addProfileParameter("running");

This example code adds a parameter named "running" to the current group. Equivalent to adding the "running" parameter in the group primitive.

()addProfileParameter("foo", "bar");

This example code adds a parameter named "foo" to the current group, with a value of "bar". Equivalent to adding the "foo:bar" parameter in the group primitive.

    ()addProfileParameter("foo", 0.5);

This example code adds a parameter named "foo" to the current group, with a value of 0.5. Equivalent to adding the "foo:0.5" parameter in the group primitive.

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