How to lock the values of an array parameter ?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-02-14 10:52 PM
‎2019-02-14
10:52 PM
I have a number of array parameters that are used for graphical editing hotspots, and I need to know how to block the values in the array parameter so that it doesn't change if a certain circumstance is met ?
I have already been able to make it with normal parameters as shown in this thread.
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.

1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-05-24 08:37 PM
‎2021-05-24
08:37 PM
You cannot lock part of array or apply specific range of variables for part of array - only to whole array.
To solve this problem I wrote a script, where first I'm creating temporary array
then using FOR - NEXT program goes through each array value, checking specific condition and if it's okey - copy it's value to temporary array.
If the condition is false, let say one editable hotspot exceed it's range, let say A>1.00 - program writes into array that A=1.00
After loop went though all array, I use
To solve this problem I wrote a script, where first I'm creating temporary array
DIM TempArray[]
then using FOR - NEXT program goes through each array value, checking specific condition and if it's okey - copy it's value to temporary array.
TempArray[ i ] = MyArray[ i ]
If the condition is false, let say one editable hotspot exceed it's range, let say A>1.00 - program writes into array that A=1.00
IF MyArray[ i ]>1 THEN TempArray[ i ]=1
After loop went though all array, I use
MyArray = TempArray PARAMETERS MyArray = MyArray