Skip to content

get_event_param

Ryzom Core Wiki edited this page Jul 8, 2024 · 3 revisions

title: Get Event Param description: published: true date: 2023-03-16T23:07:15.399Z tags: editor: markdown dateCreated: 2023-03-16T22:23:53.009Z

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.

Clone this wiki locally