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

GetPos

(Difference between revisions)
Return to current revision
  1.  
    Retrieves the current position (X, Y, Z coordinates) of an [wiki]Object[/wiki].
    [h="2"] Declaration [/h]
    [highlight=cpp]
  2. -
    VAULTSCRIPT vaultmp::Void (*GetPos)(vaultmp::ID, vaultmp::Value&, vaultmp::Value&, vaultmp::Value&);
  3. +
    VAULTSCRIPT VAULTSPACE Void (*VAULTAPI(GetPos))(VAULTSPACE ID, VAULTSPACE Value*, VAULTSPACE Value*, VAULTSPACE Value*) VAULTCPP(noexcept);
    [/highlight]
    [highlight=c]
  4.  
    native GetPos(ID, &Float:X, &Float:Y, &Float:Z);
    [/highlight]
    [h="2"] Parameters [/h]
  5. -
    [b][wiki="ID"]vaultmp::ID[/wiki][/b] - the ID of the [wiki]Object[/wiki]
    [b][wiki="Value"]vaultmp::Value[/wiki]&[/b] - a reference to a [wiki]Value[/wiki] (X coordinate)
    [b][wiki="Value"]vaultmp::Value[/wiki]&[/b] - a reference to a [wiki]Value[/wiki] (Y coordinate)
    [b][wiki="Value"]vaultmp::Value[/wiki]&[/b] - a reference to a [wiki]Value[/wiki] (Z coordinate)
  6. +
    [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)
  7.  
    [h="2"] Return value [/h]
    None.
  8. -
    [h="2"] Usage example (C++) [/h]
    [highlight=cpp]
    vaultmp::Value X, Y, Z;
    GetPos(object, X, Y, Z);
    [/highlight]
  9.  
    [category]VaultMP interface[/category]
    [category]Scripting functions[/category]
    [category]Object functions[/category]