Don't click here unless you want to be banned.

LSL Wiki : llRequestInventoryData

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are
key llRequestInventoryData(string name)

Requests data from object inventory item name. When data is available, the dataserver event will be raised with the key returned from this function in the requested parameter.

The only request currently implemented is to request data from landmarks, where the data returned is in the form "<float, float, float>" which can be directly cast to a vector. This position is in region local coordinates (that means it's the distance from the region corner) so to convert it into a global position, just add the result of llGetRegionCorner.

Note: This function delays the script for 1 second.

For a another example using this function see: llMapDestination

// llRequestInventoryData Example
// This script gets the distance from the object
// this script is in to the landmark defined by LANDMARK_NAME.
// This landmark must be in the same object as the script.
// Written by Christopher Omega

// Name of landmark.
string LANDMARK_NAME = "**landmark name here**";

// Stores the request identifyer (return value of llRequestInventoryData) 
// this value is equal to the first parameter of the dataserver event
// when the dataserver event is returning the data requested.
key inventoryRequestID = NULL_KEY;

default {
    state_entry() {
        inventoryRequestID = llRequestInventoryData(LANDMARK_NAME);
    dataserver(key requestID, string data) {
        // If dataserver event is the responce to the request
        // whose key is stored in the variable inventoryRequestID:
        if (requestID == inventoryRequestID) {
            // This prevents any dataserver "hiccups":
            inventoryRequestID = NULL_KEY;
            // When passing landmark names to llRequestInventoryData,
            // the resulting dataserver event's string parameter contains the 
            // location of the landmark in coordinates relative to the region the script
            // is currently in. (see wiki page on RegionCoordinates)
            vector regionCoords = (vector) data;
            vector myPosition = llGetPos();
            // Get the distance from my position to the landmark's position.
            float distance = llVecDist(myPosition, regionCoords);
            llSay(0, LANDMARK_NAME + " is " + (string) distance + " meters away from me.");

This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Inventory | Dataserver Jasa SEO Jasa SEO Murah Sepatu Online Toko Sepatu Online Sepatu Sepatu Murah Sepatu Safety Sepatu Futsal Cheapes Hostgator Coupon Link Booking Televisori offerte Notebook Offerte Berita Terkini Internet Marketer Muda Internet Marketer Indonesia Portatile Apple RDAnet Lorks Karikatur Bisnis Modal Kecil Bisnis UKM Berita Terbaru Iklan Baris Jasa SEO Jasa SEO Murah SEO Indonesia Konsultan SEO SEO Belajar SEO Kursus SEO Kursus SEO Murah Jam Tangan Casio Jam Tangan Casio Jam Tangan Murah Jam Tangan Grosir Baju Terbaru Grosir Baju Baju Terbaru Grosir Baju Murah Bisnis Online Belajar SEO Kerupuk Kerupuk kulit Social Bookmark Dofollow Social Bookmark Kumpulan Puisi Kirim Puisi bola hantu Penumbuh Rambut Penumbuh Rambut timbangan WBC Wonogiri Jasa SEO Murah Jasa SEO Jam Tangan Murah
There are 3 comments on this page. [Display comments/form]