From ZDoom Wiki
Jump to navigation Jump to search

GetUserArray (int tid, str name, int pos)


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.


  • 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.


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