Simple array
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-06-06 10:23 PM
2016-06-06
10:23 PM
I would like to create an object that consists of few blocks placed in a row (with a number of loop steps defined by a user).
Then I would like to make it editable, so that user could pick whichever block to be replaced by a different shape (for instance a lower block).
I assume that in order to produce such an object I have to use an array.
Can anyone explain me how to use an array by means of this example?

I have started with this, but I have a feeling that I'm not even close...
!!!!!3d script
DIM arrayB[]
FOR i=1 TO nr
IF arrayB
BLOCK 1,1,1
ELSE
BLOCK 1,1,0.5
ENDIF
addx 1.5
NEXT i
!!!!!parameter script:
VALUES 'arrayB' 'caly', 'polowa'
VALUES 'nr' RANGE[1,10)
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-06-07 12:50 AM
2016-06-07
12:50 AM
jasiek772 wrote:
Hi!
I would like to create an object that consists of few blocks placed in a row (with a number of loop steps defined by a user).
Then I would like to make it editable, so that user could pick whichever block to be replaced by a different shape (for instance a lower block).
I assume that in order to produce such an object I have to use an array.
Can anyone explain me how to use an array by means of this example?
I have started with this, but I have a feeling that I'm not even close...
!!!!!3d script
DIM arrayB[]
FOR i=1 TO nr
IF arrayB= 'caly' THEN
BLOCK 1,1,1
ELSE
BLOCK 1,1,0.5
ENDIF
addx 1.5
NEXT i
!!!!!parameter script:
VALUES 'ciag' 'caly', 'polowa'
VALUES 'nr' RANGE[1,10)
you have the right idea, but there is quite a bit more needed. If i can muster some time ill see if i cant make it work how you are attempting.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-06-07 08:00 PM
2016-06-07
08:00 PM
ok, that would be great!
I have noticed that if I remove 'DIM arrayB[]' then it works, but then of course the dimension of an array is limited, and it is equal to the number of rows stated during creating the parameter, so it is not a dynamic array...
I have noticed that if I remove 'DIM arrayB[]' then it works, but then of course the dimension of an array is limited, and it is equal to the number of rows stated during creating the parameter, so it is not a dynamic array...