Category: Objects
/ Menu
Since engine version: 5.1 OC
symbol, parameter, bRight[, value]
with bRight indicating whether the menu entry was selected with [Special2] or the right mouse button. value is passed only if bit 8 is set in extra and specifies the displayed (overridden) object value of the menu entry.func ControlUse() { // Create local menu with local commandos CreateMenu(GetID()); // Create menu items AddMenuItem("Say hello", "SayHello"); AddMenuItem("Do magic", "DoMagic"); AddMenuItem("Create an object: %s", "CreateItem", Rock); AddMenuItem("Create another object: %s", "CreateItem", Firestone); } func SayHello() { Message("Hello",this); } func DoMagic() { Sound("Magic*"); } func CreateItem(id item) { CreateContents(item); }