API:IsPlayerMainAssist
From RoR Wiki
UI Lua API · Group functions
Version: WAR 1.4.8
Returns whether the player is the main assist of their group, as the number 1 or 0.
isMainAssist = IsPlayerMainAssist()
Arguments
None.
Returns
- isMainAssist
number–1if the main assist id the client has stored equals the player's own character id, otherwise0. Nothing if there is no player object.
Details
- The result is a number, not a boolean.
0is a true value in Lua, so compare with== 1, as the stock UI does. - The same stored main assist id is used for the
isMainAssistfield of GameData.GetScenarioPlayerGroups.
Errors
None.
Example
From default/ea_playerstatuswindow/source/playerwindow.lua:
playerIsMainAssist = ( IsPlayerMainAssist() == 1 )
