Added recently is setObjectFlag(object, flag, value) which allows you to set a flag on or off for a game object.

Currently, the only available flag is the new OBJECT_FLAG_UNSELECTABLE which makes the game object unavailable from the UI. This can be used to implement tower defense or MOBA style games, where you own game entities that you cannot control directly, but that can instead be scripted.