LlStopHover

来自人工智能助力教育知识百科
跳转至: 导航搜索

Template:Needs Translation/


函数名
Function: llStopHover( );
参数:无
返回值:停止悬停到某个高度
注意事项
无(如果遇到表格情况在文段末尾加一句表格参见附录)
示例
示例1
// Put in an attached prim and touch to start floating in air without flying.
// Touch again to drop to the ground.
 
integer gHovering = FALSE; // are we supposd to be hovering now?
 
default {
    touch_start(integer total_number) {
        if (!llGetAttached()) {
            llWhisper(0, "Wear me to play.");
            return;
        }
 
        if (gHovering) {
            llOwnerSay("Releasing you.");
            llStopHover();
        }
        else {
            llOwnerSay("Making you float...");
 
            // Start hovering 5 meters over our current location.
            vector myPosition = llGetPos();
            llSetHoverHeight(myPosition.z - llGround(ZERO_VECTOR) + 5.0, FALSE, 1.0);
        }
 
        gHovering = !gHovering; // flip the switch
    }
}
相关函数
llGroundRepel

llSetHoverHeight

相关事件