<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.virtualparadise.org/index.php?action=history&amp;feed=atom&amp;title=Vp_teleport_avatar</id>
	<title>Vp teleport avatar - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.virtualparadise.org/index.php?action=history&amp;feed=atom&amp;title=Vp_teleport_avatar"/>
	<link rel="alternate" type="text/html" href="https://wiki.virtualparadise.org/index.php?title=Vp_teleport_avatar&amp;action=history"/>
	<updated>2026-05-04T21:33:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.virtualparadise.org/index.php?title=Vp_teleport_avatar&amp;diff=4264&amp;oldid=prev</id>
		<title>Sleepy E: Basic layout</title>
		<link rel="alternate" type="text/html" href="https://wiki.virtualparadise.org/index.php?title=Vp_teleport_avatar&amp;diff=4264&amp;oldid=prev"/>
		<updated>2016-12-13T20:06:48Z</updated>

		<summary type="html">&lt;p&gt;Basic layout&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{sdk method page|teleport_avatar|Request that another avatar teleports to a new location.&lt;br /&gt;
|paramex=target_session, world, x, y, z, yaw, pitch&lt;br /&gt;
|parameters=&lt;br /&gt;
  {{sdk parameter row|int    |avatar_session |Session ID of the avatar to teleport}}&lt;br /&gt;
  {{sdk parameter row|string |world          |Destination world, empty string to teleport avatar in current world}}&lt;br /&gt;
  {{sdk parameter row|float  |x              |X position}}&lt;br /&gt;
  {{sdk parameter row|float  |y              |Y position}}&lt;br /&gt;
  {{sdk parameter row|float  |z              |Z position}}&lt;br /&gt;
  {{sdk parameter row|float  |yaw            |yaw angle}}&lt;br /&gt;
  {{sdk parameter row|float  |pitch          |pitch angle}}&lt;br /&gt;
|attributes=&lt;br /&gt;
|returncodes=&lt;br /&gt;
  {{sdk return code row|NOT_IN_WORLD |Bot is not currently in a world}}&lt;br /&gt;
|behavior=&lt;br /&gt;
* Upon successfully requesting a teleport, {{sdk event|TELEPORT}} is sent to the avatar, provided it has subscribed to it.  See {{sdk method|event_set}}.&lt;br /&gt;
|caveats=&lt;br /&gt;
|examples=&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
void handle_chat(VPInstance sdk)&lt;br /&gt;
{&lt;br /&gt;
  const char *str;&lt;br /&gt;
&lt;br /&gt;
  str = vp_string(sdk, VP_CHAT_MESSAGE);&lt;br /&gt;
&lt;br /&gt;
  if (stricmp(str, &amp;quot;/home&amp;quot;) == 0) // Request for teleport to center of world&lt;br /&gt;
    vp_teleport_avatar(sdk, vp_int(sdk, VP_AVATAR_SESSION), &amp;quot;&amp;quot;, 0, 0, 0, 0, 0);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main(int argc, const char* argv[])&lt;br /&gt;
{&lt;br /&gt;
  //...&lt;br /&gt;
&lt;br /&gt;
  vp_event_set(sdk, VP_EVENT_CHAT, handle_chat);&lt;br /&gt;
&lt;br /&gt;
  //...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|seealso=&lt;br /&gt;
* {{sdk event|TELEPORT}}&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Sleepy E</name></author>
	</entry>
</feed>