<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
	<id>http://i.bnu.edu.cn/wiki/index.php?action=history&amp;feed=atom&amp;title=LlSetRegionPos</id>
	<title>LlSetRegionPos - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="http://i.bnu.edu.cn/wiki/index.php?action=history&amp;feed=atom&amp;title=LlSetRegionPos"/>
	<link rel="alternate" type="text/html" href="http://i.bnu.edu.cn/wiki/index.php?title=LlSetRegionPos&amp;action=history"/>
	<updated>2026-06-01T03:37:43Z</updated>
	<subtitle>本wiki的该页面的版本历史</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>http://i.bnu.edu.cn/wiki/index.php?title=LlSetRegionPos&amp;diff=597&amp;oldid=prev</id>
		<title>Wzc：创建页面，内容为“{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}}   {{函数详情 |函数名 = Function: integer llSetRegionPos( vector position ); |参数= 参数…”</title>
		<link rel="alternate" type="text/html" href="http://i.bnu.edu.cn/wiki/index.php?title=LlSetRegionPos&amp;diff=597&amp;oldid=prev"/>
		<updated>2020-08-13T08:43:23Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}}   {{函数详情 |函数名 = Function: integer llSetRegionPos( vector position ); |参数= 参数…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{函数详情&lt;br /&gt;
|函数名 = Function: integer llSetRegionPos( vector position );&lt;br /&gt;
|参数= 参数：&lt;br /&gt;
返回一个整数布尔值，如果对象成功放置在距离位置0.1米的范围内，则返回TRUE；否则返回FALSE。详见规范。&lt;br /&gt;
•矢量位置–区域坐标中的位置&lt;br /&gt;
只有当返回TRUE时，对象才会移动；如果返回FALSE，则对象不会改变位置。&lt;br /&gt;
|返回值= 返回值：尝试移动整个对象，使根prim位于位置的0.1m范围内。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|注意事项=带有脚本的对象将根prim位置移动到给定位置。位置是区域内的任何位置。如果位置低于地面，它将被设置为X，Y点的地面高度。该功能没有延迟或油门。&lt;br /&gt;
如果对象成功放置在距离位置0.1 m的范围内，则返回TRUE。&lt;br /&gt;
如果。。。&lt;br /&gt;
位置偏离区域10m以上或4096m以上。&lt;br /&gt;
位置的x和y分量必须在范围[-10.0，266.0]内。[1]&lt;br /&gt;
z分量必须在[0.0，4096]范围内。&lt;br /&gt;
对象是动态的（启用了物理）。&lt;br /&gt;
由于地块/区域限制（对象输入规则、主要限制、禁止等），对象无法移动到位置。&lt;br /&gt;
对象是一个化身附件。&lt;br /&gt;
如果z位置低于地面，则返回FALSE并移动对象。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|示例=&lt;br /&gt;
示例1&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    touch_start(integer num_detected)&lt;br /&gt;
    {&lt;br /&gt;
        vector currentPosition = llGetPos();&lt;br /&gt;
 &lt;br /&gt;
        // check whether the object has successfully been moved&lt;br /&gt;
        // to the center of the sim at the same height&lt;br /&gt;
        integer hasMoved = llSetRegionPos(&amp;lt;128.0, 128.0, currentPosition.z&amp;gt;);&lt;br /&gt;
 &lt;br /&gt;
        if (hasMoved)&lt;br /&gt;
        {&lt;br /&gt;
            llOwnerSay(&amp;quot;My new position is now:\n&amp;quot;&lt;br /&gt;
                + &amp;quot;http://maps.secondlife.com/secondlife/&amp;quot; + llEscapeURL(llGetRegionName())&lt;br /&gt;
                + &amp;quot;/128/128/&amp;quot; + (string)llRound(currentPosition.z) + &amp;quot;/&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        else if ( currentPosition.z &amp;lt; llGround(ZERO_VECTOR) )&lt;br /&gt;
        {&lt;br /&gt;
            llOwnerSay(&amp;quot;My new position is now:\n&amp;quot;&lt;br /&gt;
                + &amp;quot;http://maps.secondlife.com/secondlife/&amp;quot; + llEscapeURL(llGetRegionName())&lt;br /&gt;
                + &amp;quot;/128/128/&amp;quot; + (string)llCeil(llGround(ZERO_VECTOR)) + &amp;quot;/&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
            llOwnerSay(&amp;quot;Move was not possible!&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|相关函数=&lt;br /&gt;
[[llGetLocalPos]] –返回prim的本地位置（如果是附加的或非根的）（否则返回全局位置）&lt;br /&gt;
&lt;br /&gt;
[[llGetRootPosition]]	–获取根prims位置	&lt;br /&gt;
&lt;br /&gt;
[[llGetPos]] –返回prim的全局位置，即使它是附加的还是非根的&lt;br /&gt;
&lt;br /&gt;
[[llSetPos]]	&lt;br /&gt;
&lt;br /&gt;
[[llEdgeOfWorld]]&lt;br /&gt;
&lt;br /&gt;
|相关事件=&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Wzc</name></author>
		
	</entry>
</feed>