예제 #1
0
        public void llExecCharacterCmd(LSL_Integer command, LSL_List options)
        {
            IBotManager botManager = World.RequestModuleInterface <IBotManager>();

            if (botManager != null)
            {
                IBotController controller = botManager.GetCharacterManager(m_host.ParentEntity.UUID);
                if (controller != null)
                {
                    if (command == ScriptBaseClass.CHARACTER_CMD_JUMP)
                    {
                        controller.Jump();
                    }
                    if (command == ScriptBaseClass.CHARACTER_CMD_STOP)
                    {
                        controller.StopMoving(false, true);
                    }
                }
            }
        }
예제 #2
0
        public void llUpdateCharacter(LSL_List options)
        {
            IBotManager botManager = World.RequestModuleInterface <IBotManager>();

            if (botManager != null)
            {
                IBotController controller = botManager.GetCharacterManager(m_host.ParentEntity.UUID);
                if (controller == null)
                {
                    return;         // nothing to controll :(
                }
                for (int i = 0; i < options.Length; i += 2)
                {
                    LSL_Integer opt   = options.GetLSLIntegerItem(i);
                    LSL_Float   value = options.GetLSLFloatItem(i + 1);
                    if (opt == ScriptBaseClass.CHARACTER_DESIRED_SPEED)
                    {
                        controller.SetSpeedModifier((float)value.value);
                    }
                    else if (opt == ScriptBaseClass.CHARACTER_RADIUS)
                    {
                    }
                    else if (opt == ScriptBaseClass.CHARACTER_LENGTH)
                    {
                    }
                    else if (opt == ScriptBaseClass.CHARACTER_ORIENTATION)
                    {
                    }
                    else if (opt == ScriptBaseClass.CHARACTER_AVOIDANCE_MODE)
                    {
                    }
                    else if (opt == ScriptBaseClass.CHARACTER_TYPE)
                    {
                    }
                    else if (opt == ScriptBaseClass.TRAVERSAL_TYPE)
                    {
                    }
                    else if (opt == ScriptBaseClass.CHARACTER_MAX_ACCEL)
                    {
                    }
                    else if (opt == ScriptBaseClass.CHARACTER_MAX_DECEL)
                    {
                    }
                    else if (opt == ScriptBaseClass.CHARACTER_MAX_TURN_RADIUS)
                    {
                    }
                    else if (opt == ScriptBaseClass.CHARACTER_DESIRED_TURN_SPEED)
                    {
                    }
                    else if (opt == ScriptBaseClass.CHARACTER_MAX_SPEED)
                    {
                    }
                    else if (opt == ScriptBaseClass.CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES)
                    {
                    }
                    else if (opt == ScriptBaseClass.CHARACTER_STAY_WITHIN_PARCEL)
                    {
                    }
                }
            }
        }