Editing Papyrus FAQs

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 290: Line 290:
=== How do I create a dynamic array? ===
=== How do I create a dynamic array? ===


Dynamic arrays grow to fit the number of elements.
According to SmkViper:


To create an empty dynamic array, pass <code>0</code> as the size.
<pre>
 
Arrays are now dynamic. To create an empty array, pass 0 as the size. You are
<code>
now allowed to pass in a variable or calculation for an array size, and you can
ObjectReference[] dynamicArray = new ObjectReference[0]
call add and remove on the array to add and remove items.
</code>
</pre>
 
Also:
 
* You can pass in a variable or calculation for the array size.
* You can call <code>Add()</code> and <code>Remove()</code> on the array to add and remove items.


=== How do I create key-value pairs? ===
=== How do I create key-value pairs? ===

Please note that all contributions to the Fallout4 CreationKit Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see FalloutCK:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)