Page 1 of 1

is there a way to change the default right click command?

Posted: 08 Oct 2007, 17:04
by BigHead
I want builders to use my custom UpgradeMex command as right click command for metal extractors. Right now I use a little hack which uses widget:MousePress and GiveOrderToUnit to do it. Is there a better way to do it?

Posted: 08 Oct 2007, 17:21
by trepan
The related call-in that's been added to SVN:

DefaultCommand(<type>, <data>) -> false | number cmdID

type = string 'unit', data = number unitID
type = string 'feature', data = number featureID
type = nil, data = nil

This call-in works in LuaUI, LuaCob, and LuaRules.

Posted: 08 Oct 2007, 17:50
by BigHead
thank you very much trepan