Jump to content

XbabylonX

Resident
  • Posts

    281
  • Joined

  • Last visited

Posts posted by XbabylonX

  1. Hello,

    I was reading the following article

    http://wiki.secondlife.com/wiki/Linden_Lab_Official:Map_API_Introduction

    and at the "Accesing map images directly" paragraph, provides an example:

    X,Y - X and Y coordinates on the Second Life Grid of the region, for example, region Ahern is (997,1002).

    Says Ahern coordinates are 997-1002. I dont know how one can get these numbers for any sim.

    Some lights please?

     

    PS Im sorry if this is not the correct forum to post it!

  2. default
    {
        on_rez(integer start_param)
        {
        llResetScript();   
        }
     
        changed(integer change)
        {
            if (change & (CHANGED_OWNER | CHANGED_INVENTORY))
                llResetScript();
        }
            
        state_entry()
        {
        state First;
        }
    }
    
    state First
    {
        state_entry()
        {
        llSetText("Please wait...", <1.000, 0.863, 0.000>, 1.0 );
        //HERE CODE FOR COMMUNICATING WITH A WEBSERVER   
        }
    
        http_response(key request_id, integer status, list metadata, string body)
        {
            if (request_id==myRequest)
            {
            //THE RESPONSE OF THE WEBSERVER IS BEING SET AS TEXT ON THE PRIM
            llSetText(body, <1.000, 0.863, 0.000>, 1.0 );
            }
        }
    
    }

    Hello, I have a problem with the script above.

    When I rez a prim with this script in it for the first time, everything goes as it should.

    The problem is when I take back the rezed prim in my inventory and then re-rez it again. It has as a text the webserver's response it took when it was rezzed for the first time.

    Shouldnt the llResetScript() solve this issue and force the script to run from the beggining when rezed for the second time?

    Thank you for your time.

  3. Rolig, I guess you mean here "money(key id, integer amount)" , in my own code:

     

        money(key id, integer amount)    {    state Two;    }

     

    the key id is the avatar id, right?

    If yes, I have to set a global variable inside the money brackets?

  4. Thank you for your replies.

    You both must be correct.

    Here is the deal:

    1) Someone clicks a prim for a payment

    2) After payment is done, I want to popup a dialog box with text input

    Just like you saying, I have to be careful with the process. Any advice on how to make it as it should?

  5. Hello,

    Im trying to get avatar's key id in the state_entry of a state called Two.

    Notice that the user gets in the state Two after a different state called One, for example

    state One
    {
        state_entry()
        {
            llSay(0, "Hello, Avatar!");
        }
    
        touch_start(integer total_number)
        {
        state Two;
        }
    }

     

    So in place of the ??? in the following code:

    state Two
    {
        state_entry()
        {
        AvatarKey=???
        }
    }

     what should I write?

     Thank you for your time.

  6. Cerise,

    I have to init my object having the touch trigger and only in some cases (depending the callbacks) I need to cancel the trigger. So isnt possible to use your scenario up side down?

    Revochen, I didnt mean injecting a function from outside of sl, my server just sends 1 or 0, then the simple things happens:

    if callback=1

    everything fine

    else if callback=0

    remove the touch trigger of the object

    Maybe that example can point you to the right idea of what Im trying to make.

    But thanks again guys, I will read your responses tomorrow since I need to sleep :)

     

  7. Hello,

    Im trying for many days to do this, after gatting a callback from a webserver to assign a function on an object, with few words, its a simple prim with no function called when clicking on it, but after the callback it should have a function. With the same logic, depending on the callback value I would like to remove the function. Someone who is familiar with jquery would understand that as:

    $("#objectid").attr("onClick","newfunction()");

     One more thing Im trying to achieve after the callback is to create a global variable, but again with no success.

    I would appreciate your help.
    Thank you for your time

×
×
  • Create New...