Is it me or the Macro script editor

Parameters are global variables and you always have access to them.
So this should do the trick: (Lua script module)

function resetSwitchChange()
	if knob > 0 then
	knob = 0
	end
end


defineParameter("knob", nil, 0, 0, 100, 1)

defineParameter("resetSwitch", nil, false, resetSwitchChange)

As it was explained to me, if it handles UI changes put the script in macro script, if it handles Halion engine matters use the Lua script module and link parameters via drag and drop to the UI controller.

There a re a few very important topics in the script reference to understand:

Creating Parameters

Working with Parameters

Threads in HALion

Understanding the class elements and hierarchy is also very important.