Editing Scripting Tutorial: Working with FormLists
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
{{Incomplete}} | |||
This article is a WIP. I'll try to finish it in the next few days.--[[User:Omzy|Omzy]] 00:50, 1 August 2009 (UTC) | |||
==IMPORTANT== | ==IMPORTANT== | ||
'''You will need [[ | '''You will need [[Fallout_Script_Extender]] for this tutorial.''' | ||
==Introduction== | ==Introduction== | ||
Line 6: | Line 9: | ||
FormLists were originally created to serve a variety of purposes (See [[FormList]]). The creators of FOSE developed a handful of new functions that allow easy script manipulation of FormLists. These functions made FormLists much more powerful, giving them the all the functionalities of the List programming construct found in almost all high level programming languages. | FormLists were originally created to serve a variety of purposes (See [[FormList]]). The creators of FOSE developed a handful of new functions that allow easy script manipulation of FormLists. These functions made FormLists much more powerful, giving them the all the functionalities of the List programming construct found in almost all high level programming languages. | ||
==FormList Functions== | ==FormList Functions== | ||
Line 46: | Line 47: | ||
==Modifying FormLists== | ==Modifying FormLists== | ||
*create a list: can you do this dynamically? (just create it in the editor first) | |||
*adding forms to the list (which index do they start at if unspecified?) | |||
**ListAddForm | |||
**ref.ListAddReference | |||
*removing forms from the list | |||
**ListRemoveForm | |||
**ListRemoveNthForm | |||
*replacing forms in the list | |||
**ListReplaceForm | |||
**ListReplaceNthForm | |||
*getting forms from the list | |||
**ListGetForm | |||
**ListGetNthForm | |||
*getting form information | |||
**ListGetFormIndex | |||
**ListGetCount | |||
That | ==Lists of Lists...What?== | ||
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: | |||
(script here) | |||
(add more scripting tricks/uses) | |||