grandMA3 User Manual Publication

Unhook(integer)

grandMA3 User Manual » Plugins » Lua Functions - Object-Free API » Unhook(integer)
Version 2.1

Description

The Unhook Lua function removes a hook.

Hooks are an automatically triggered function that activates when a grandMA3 object changes. A hook can be created using the HookObjectChange function.

Arguments

  • Integer:
    This must be the integer matching the hook that should be unhooked.
Hint:
All hooks can be listed using the DumpAllHooks function, but this does not reveal the corresponding hook integer ID. Use the UnhookMultiple function if the integer is unknown.

Return

This function does not return anything. 


Hint:
See also these related functions: DumpAllHooks, HookObjectChange, UnhookMultiple.

Example

This example unhooks the hook created using the example in the HookObjectChange - please run that example before this one.

Lua
return function()
-- Unhooks the specific Hook integer ID.
Unhook(SequenceHookId)
end