NewWeaponInstance

From GECK
Jump to: navigation, search


A function added by the pp NVSE Plugin.

Description

Similar to TempCloneForm, this creates a new weapon instance, for use with GetWeaponBase and IsWeaponInstance. The EditorID of the new instance will be the ParentsEditorID + "Inst" + WeaponInstanceCount.

Syntax

[help]
(none) NewWeaponInstance Weapon:ref BasePlugin:string

Example

NewWeapInst WeapNV9mmPistol "MyPlugin.esm"

Will create a new weapon form using MyPlugin.esm as it's index. The new Instance EditorID will be WeapNV9mmPistolInst1

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.

See Also