Difference between revisions of "Scripting Tutorial: Working with FormLists"
Scripting Tutorial: Working with FormLists (edit)
Revision as of 10:37, 3 August 2009
, 10:37, 3 August 2009no edit summary
imported>Omzy |
imported>Omzy |
||
Line 101: | Line 101: | ||
#Cid | #Cid | ||
Let us create a [[FormList]] for each name that contains the letters of that name. If we try dragging and dropping ''B, a, r, r, e, t'' into a FormList for the name Barret, we will not be able to add the second ''t'' because dragging and dropping allows us only to add base forms to a FormList once, since they have the same FormID. So, we must add the letters as references via a script using [[ListAddReference]] OR by placing the letters into the world in a cell somewhere and dragging their references from the Cell View window. | |||
If we wish to print these names into the world somewhere, we can use the [[Label]]/[[GoTo]] loop, one loop for each FormList of letters: | |||
As it would seem, a FormList is also an object in the editor, which has its own FormID. That makes a FormList a Form. What this means is that FormLists can contain other FormLists. This may seem a bit confusing if you've never learned any mid-level programming before, so lets look at the following script and see what it does: | As it would seem, a FormList is also an object in the editor, which has its own FormID. That makes a FormList a Form. What this means is that FormLists can contain other FormLists. This may seem a bit confusing if you've never learned any mid-level programming before, so lets look at the following script and see what it does: | ||