Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:JoinScenarioGroup

From RoR Wiki

UI Lua API · Scenario functions
Version: WAR 1.4.8

Asks the server to put the player into a scenario group.

JoinScenarioGroup(groupIndex)

Arguments

groupIndex
number – Scenario group to join. Only the low 8 bits are sent.

Returns

Nothing.

Details

  • Nothing happens if there is no player object, or if the player is neither in a scenario (GameData.Player.isInScenario) nor in a city siege (GameData.Player.isInSiege). In that case the argument is not checked either.
  • Nothing is sent when groupIndex is 0.
  • The client does not change any group data itself; the result comes from the server.
  • The function takes exactly one argument.

Errors

None besides the generic Invalid Parameters message when the argument is missing or not a number.

Example

From default/ea_scenariogroupwindow/source/scenariogroupwindow.lua (each Join button carries its group index as window id):

local selGroupIndex = WindowGetId( SystemData.ActiveWindow.name )
JoinScenarioGroup( selGroupIndex )

See also