GetUserArray
GetUserArray (int tid, str name, int pos)
Usage
Retrieves the value of one of the affected actor's user or native array-bound variables. Native arrays are arrays which are preceded by the keyword native when declared.
Parameters
- tid: the TID of the affected actor. If 0, the script's activator is used.
- name: the name of the array. Acceptable array types are int, double, bool, string and name.
- pos: the position in the array, 0-indexed.
Return value
The value stored in the specified position of the array. double is returned as a fixed-point value, while name is returned as a string.
Examples
This function adds a rank to the specified 'skill' in the activator.
function void SetRanks (int skill, int amt) { SetUserArray(0, "user_skills", skill, amt + GetUserArray(0, "user_skills", skill)); }
See also
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.