API:BuildSiegeWeapon
From RoR Wiki
UI Lua API · RvR functions
Version: WAR 1.4.8
Asks the server to build a siege weapon at the siege pad the player is interacting with.
BuildSiegeWeapon(weaponId)
Arguments
- weaponId
number– Theidof an entry from GetSiegePadBuildData. Only the low 16 bits are sent.
Returns
Nothing.
Details
- The request is sent as an interaction with the object the player last interacted with. Nothing is sent if there is no such object or if the network connection is not ready.
- The client does not check
weaponIdagainst the build list or the required items; the server decides. - 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_siegeweaponwindow/source/siegeweaponbuildwindow.lua:
local weaponId = SiegeWeaponBuildWindow.weaponsData[SiegeWeaponBuildWindow.selectedWeapon].id ... BuildSiegeWeapon( weaponId ) SiegeWeaponBuildWindow.Hide()
