get_event_param - ryzom/ryzomcore GitHub Wiki


title: Get Event Param description: published: true date: 2023-03-12T21:11:37.688Z tags: editor: markdown dateCreated: 2023-03-12T21:11:34.603Z

getEventParam

The getEventParam native AI script function is used to retrieve the content of a parameter passed by an EGS ai_event message.

Syntax

(value: f)getEventParam(paramIndex: f) // getEventParam_f_f
(value: s)getEventParam(paramIndex: f) // getEventParam_f_s

Arguments

  • paramIndex (float): The index of the parameter whose content is to be retrieved.

Return value

(f)getEventParam(f)

  • value (float): A float value corresponding to the content of the parameter at the specified index.

(s)getEventParam(f)

  • value (string): A string value corresponding to the content of the parameter at the specified index.

Example

(val)getEventParam(2); 

In this example, the function getEventParam is called with an index of 2, which corresponds to the third parameter passed by the EGS ai_event message. The value of this parameter is returned as a float and stored in the variable val.

($val)getEventParam(2); 

In this example, the function getEventParam is called with an index of 2, and the value of the parameter is returned as a string and stored in the variable val.

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