VisionaireObject Command: clearLink

From The Official Visionaire Studio: Adventure Game Engine Wiki
Revision as of 17:47, 11 August 2023 by EK (talk | contribs) (Created page with "Removes a link from the VisionaireObject. == Syntax == <syntaxhighlight lang="lua"> clearLink(field) </syntaxhighlight> == Parameters == {| class="ts" |- ! style="width:1...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Removes a link from the VisionaireObject.


Syntax

clearLink(field)


Parameters

Parameter Type Description
field int The object field to be cleared; has to be of "t_link" type.

Specify the field constant name (V + object table name in singular + field name) or the field id, see the example.


Return values

none


Examples

Example 1: Clear the link to the currently used item (will remove a dragged item from the cursor).

-- Specify the field constant name
game:clearLink(VGameUsedItem)

-- Or specify the field id
game:clearLink(686)

-- Setting an empty object leads to the same result
game:setValue(VGameUsedItem, emptyObject)