Table of Contents

Method Clone

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

Clone(NwGameObject, string?, bool, bool)

Creates a copy of this item.

public NwItem Clone(NwGameObject targetInventory, string? newTag = null, bool copyLocalState = true, bool preserveDropFlag = true)

Parameters

targetInventory NwGameObject

The target inventory to create the cloned item.

newTag string

A new tag to assign the cloned item.

copyLocalState bool

If true, local variables on the item are copied.

preserveDropFlag bool

If true, preserves the Droppable state of the item.

Returns

NwItem

The newly cloned copy of the item.

Clone(Location, string?, bool)

Creates a copy of this game object.

public override NwItem Clone(Location location, string? newTag = null, bool copyLocalState = true)

Parameters

location Location

The location to create the cloned object.

newTag string

A new tag to assign the cloned object.

copyLocalState bool

If true, will clone all local variables, effects, action queue and transition info (triggers, doors) for the object.

Returns

NwItem

The newly cloned copy of the item.

Clone(Location, bool, string?, bool)

Creates a copy of this item.

public NwItem Clone(Location location, bool preserveDropFlag, string? newTag = null, bool copyLocalState = true)

Parameters

location Location

The location for the copied item.

preserveDropFlag bool

If true, preserves the Droppable state of the item.

newTag string

A new tag to assign the cloned item.

copyLocalState bool

If true, local variables on the item are copied.

Returns

NwItem

The newly cloned copy of the item.