This site has been archived and made available for preservation purposes. No edits can be made.

GetPos

(Difference between revisions)
Return to current revision
Current Revision 11-17-2012, 01:24 AM
  1. -
    Retrieves the last known position (X, Y, Z coordinates) of an [[Object]].

    == Declaration ==
    <code cpp>
    VAULTSCRIPT void (*GetPos)(vaultmp::ID, vaultmp::Value&, vaultmp::Value&, vaultmp::Value&);
  2. +
    Retrieves the current position (X, Y, Z coordinates) of an [wiki]Object[/wiki].
    [h="2"] Declaration [/h]
    [highlight=cpp]
    VAULTSCRIPT VAULTSPACE Void (*VAULTAPI(GetPos))(VAULTSPACE ID, VAULTSPACE Value*, VAULTSPACE Value*, VAULTSPACE Value*) VAULTCPP(noexcept);
    [/highlight]
    [highlight=c]
  3.  
    native GetPos(ID, &Float:X, &Float:Y, &Float:Z);
  4. -
    </code>
    == Parameters ==

    '''[[vaultmp::ID]]''' - the ID of the Object

    '''[[vaultmp::Value]]&''' - a reference to a Value (X coordinate)

    '''[[vaultmp::Value]]&''' - a reference to a Value (Y coordinate)

    '''[[vaultmp::Value]]&''' - a reference to a Value (Z coordinate)

    == Return value ==

  5. +
    [/highlight]
    [h="2"] Parameters [/h]
    [b][wiki="ID"]ID[/wiki][/b] - the ID of the [wiki]Object[/wiki]
    [b][wiki="Value"]Value[/wiki]*[/b] - used to return a [wiki]Value[/wiki] (X coordinate)
    [b][wiki="Value"]Value[/wiki]*[/b] - used to return a [wiki]Value[/wiki] (Y coordinate)
    [b][wiki="Value"]Value[/wiki]*[/b] - used to return a [wiki]Value[/wiki] (Z coordinate)
    [h="2"] Return value [/h]
  6.  
    None.
  7. -

    == Usage example (C++) ==

    <code cpp>
    vaultmp::Value X, Y, Z;
    GetPos(object, X, Y, Z);
    </code>
  8. +
    [category]VaultMP interface[/category]
    [category]Scripting functions[/category]
    [category]Object functions[/category]