grandMA3 User Manual Publication

GetClassDerivationLevel(string)

grandMA3 User Manual » Plugins » Lua Functions - Object-Free API » GetClassDerivationLevel(string)
Version 2.1

Description

The GetClassDerivationLevel Lua function returns an integer indicating the derivation level index for a class based on a class name.

Arguments

  • String:
    This string needs to be the name of a class.

Return

  • Integer:
    The returned integer indicates the class derivation level.

Example

This example prints the index integer for the Pool class in the Command Line History:

Lua
return function()
-- Get the index integer for the "Pool" class.
local classDerivationLevel = GetClassDerivationLevel("Pool")
-- Create a valid Printf return.
if classDerivationLevel == nil then
Printf("The return is nil")
else
Printf("The ClassDerivationLevel index for 'Pool' is: %i", classDerivationLevel)
end
end