ScriptCore3.obj2menu

From Soldat Community Wiki
Revision as of 18:14, 1 May 2018 by Morko (talk | contribs)
Jump to: navigation, search
function obj2menu(Style: Byte): Byte
 Style: Position(Style) of the weapon in the TMapObject.Style
 Result: Position(Style) of the weapon in the Weapons List

Description

Translates the position of the weapon in the Style property of a Map Object - lying weapon (TMapObject.Style) to the corresponding position in the Weapon Menu (Weapons List).

Examples

begin
    WriteLn('obj2menu: '+inttostr(menu2obj(5))); //1
    WriteLn('obj2menu: '+inttostr(menu2obj(26))); //14
    WriteLn('obj2menu: '+inttostr(menu2obj(1))); //Exception: Invalid object style ( Unfortunately you can't choose flag in the weapon menu ;( )
end.