/ HALion Developer Resource / HALion Script / Reference /
setParameterNormalized
setParameterNormalized(nameOrID, value, undo)
Description
Function to set the value of a parameter in the normalized range from 0 to 1.0. The parameter can be determined by name or ID. This function has no effect if the parameter does not exist or if the value is of the type string.
Available in: Controller, Processor.
Arguments
Argument | Description | Value Type |
---|---|---|
nameOrID | The name or ID of the parameter. | string or number |
value | The value you want to set in the normalized range from 0 to 1.0. | number |
undo | Determines if the parameter change will be part of the undo. This argument is only evaluated in the controller context. A parameter change in the processor context never has undo. If setParameter is called in the controller context it will be part of the undo, unless you set this argument to false . For example, you should set this to false if the call to setParameter is made within a parameter callback that is already part of the undo, and if the order of execution of these parameter changes is important. | boolean, optional |
Example
-- Set the normalized value of the parent layer's level parameter.
function onLoadIntoSlot()
this.parent:setParameterNormalized("Level", 0.5) -- Set via name.
this.parent:setParameterNormalized(38, 0.5) -- Set via ID.
end
See also: getParameterNormalized, getParameter, setParameter, hasParameter