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