CreateFormInstance
From GECK
A function added by the pp NVSE Plugin.
Contents
Description
Similar to TempCloneForm, this creates a new weapon instance, for use with GetStaticForm and IsWeaponInstance. The EditorID of the new instance will be the ParentsEditorID + "Inst" + WeaponInstanceCount.
Syntax
(instance) CreateFormInstance Weapon:baseform key:string
Example
ref r9mmInstance = CreateFormInstance WeapNV9mmPistol "MyInstanceKey"
Will create a new weapon form with MyInstanceKey as its key.
Notes
- You can not create instances of instances. Only instances of existing baseforms.
- You can have multiple instances pointing to the same parent.
- It's advised to use GetWeaponBase for comparing weapons rather that GetBaseObject.