Jump to content

[LE] Help with Arrays pls :D !


Recommended Posts

FormList have any Size limits?

 

cause if i learn correct you have Functions to Add and Remove objects from FormList

 

 

so there is no reason to use Arrays if we can use FormLists...

1) FormList can store InGame objects

2) FormList can store ObjectsForms

3) FormList can be change InGame

4) FormList can be used by many Scripts in same time

and many many more reason to use FormLists

 

i see no reason to use Arrays...

 

 

it there anything that Arrays can do what FormList can't?

is there any reason to no use FormLists ?

 

 

cause Arrays in compare to FormLists looks very bad

Link to comment
Share on other sites

Link to comment
Share on other sites

@TobiaszPL Arrays are a common part of programming in most languages. Skyrim papyrus has a limited form of arrays

with a limit on size and no support for multidimensional arrays. Arrays and forms are both good and both have a variety of uses.

In my case with my example I just needed to store all the objects I was using and be able to flush them to do it again and again.

I also used two arrays "chains" to create a type of multidimensional array that I used to build a maze generator with. All this needed

to be built and flushed on the fly so arrays for me worked out well. I started out with forms but in the end the constant referencing made the build

far to slow. Form approach took 10 to 15 min to build a maze as the arrays did it in less than 1 min. But first I had to over come the array limit ...

Link to comment
Share on other sites

FormList have any Size limits?

 

cause if i learn correct you have Functions to Add and Remove objects from FormList

 

 

so there is no reason to use Arrays if we can use FormLists...

1) FormList can store InGame objects

2) FormList can store ObjectsForms

3) FormList can be change InGame

4) FormList can be used by many Scripts in same time

and many many more reason to use FormLists

 

i see no reason to use Arrays...

 

 

it there anything that Arrays can do what FormList can't?

is there any reason to no use FormLists ?

 

 

cause Arrays in compare to FormLists looks very bad

 

There are a few advantages to arrays over FormLists:

 

1. They can store things a FormList cannot (because they aren't forms): Numbers, strings, Aliases, and ActiveMagicEffects.

2. Arrays can be generated at runtime, as many as needed, and be (by default) independent for each instance of the script. FormLists need to be saved into an *.esp file, an approach that doesn't scale well if you need an arbitrary or large number of lists.

3. FormList retrieval and search is frame-rate-linked; array manipulation is not. Arrays are much faster as a result.

4. Arrays allow you full control of order within the array, so you can do things like sort it.

5. Arrays can store the NONE null value for objects. FormLists can't.

 

The primary advantages FormLists have over arrays are that they can talk to game systems and are size unlimited.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...