yesterday
Hi,
I have a calculation that checks the current scale for the 2D Script. It calculates a max height based on the current scale.
2D Script:
MaxHeight = Val_A + VAL_B
The height needs to limit the movement of a Hotspot using VALUES RANGE command. The VALUES RANGE command is placed in the Masterscript, but not in the 2D Script as far as I know. But when I do this, the MaxHeight doesn't seem to register. I have also tried placing the following VALUE RANGE command in the parameters script without success.
Master Script:
VALUE 'Hotspot_Y' RANGE (0, MaxHeight)
Is there a way to pass a result from the 2D script to the Master Script so I can limit the movement of the hotspot?
Any ideas most welcome, Matt
yesterday
The scale you are requesting, as I understand, is controlled by GLOB_SCALE. This global variable is not allowed in the Parameter Script or the Master Script when it runs as a Parameter Script. Therefore, moving the relevant part of the 2D Script to the Master Script will not work if combined with a VALUES command. The reason is that VALUES is always executed as part of the Parameter Script, even if placed in the Master Script. (You can test it to confirm, but I believe it won’t work.)
The command VALUE 'Hotspot_Y' RANGE (0, MaxHeight) cannot work in the Parameter Script because it must use VALUES.
However, in your case, the VALUES command should work in both the Master Script and the Parameter Script.
yesterday
Hi Jochen,
Thank you for your reply!
Oddly the VALUES command doesn't seem to limit in anyway the hotspot in Master or Parameter script. The 0 value nor the MaxHeight limits are not applied:
Master or Parameter Script
VALUES 'Hotspot_Y' RANGE (0, MaxHeight)
I am wondering if only it is because the Master and Parameter scripts are run before the 2D scripts where the GLOB_SCALE calculation resides. The MaxHeight value doesn't seem to be able to be called from the 2D Script, rendering the VALUES command null?
2D Script
VAL_B = GLOB_SCALE
MaxHeight = Val_A + VAL_B
Is there maybe someway to create a variable to pass the value through from within the 2D script by adding:
VAL_B = GLOB_SCALE
MaxHeight = Val_A + VAL_B
Var_MxHt = MaxHeight
And then calling the variable in the Master or Parameter Script with:
VALUES 'Hotspot_Y' RANGE (0, Var_MxHt)
It is most perplexing for me!
Kind regards, Matt
4 hours ago
If you want to pm me we could chat over Google or something to solve things for you in real time. I've been doing this for a few others here and there.