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
The getEventParam native AI script function is used to retrieve the content of a parameter passed by an EGS ai_event message.
(value: f)getEventParam(paramIndex: f) // getEventParam_f_f
(value: s)getEventParam(paramIndex: f) // getEventParam_f_s
- paramIndex (float): The index of the parameter whose content is to be retrieved.
- value (float): A float value corresponding to the content of the parameter at the specified index.
- value (string): A string value corresponding to the content of the parameter at the specified index.
(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
.