GenericReplaceForm

From GECK
Jump to: navigation, search


A function added by the New Vegas Script Extender.

Description

Replaces a form within an embedded list of forms associated with an object at a given index with a new one. Returns the replaced form.

Syntax

[help]
(OldForm:ref) GenericReplaceForm ListCode:int Target:object New:form Index:int 

Embedded List Codes

Example

To give Easy Pete a new beard:

ref OldForm

let OldForm := GenericReplaceForm 10, EasyPeteREF, BeardChopper, 0

; OldForm is 'Old Beard', now he's got a chopper.

Note: Changes to an actor's 3D are not visible until it reloads, which can be forced using Update3D.

See Also