Menu

Dialog Example does not work

Help
2008-09-04
2013-04-26
  • Benno Munster

    Benno Munster - 2008-09-04

    I can't get the Dialog Example, that comes with version 0.5.1, to work.
    When I set breakpoints in all events in dialog_script.lslp as well as eventhandler.lslm, and start dialogsim.simp in the debugger, I see that the state_entry and sensor events are invoked, but then nothing happens.  I would expect that the dialog function in eventhandler.lslm would be called as result of the llDialog call in dialog_script.lslp, but I do not see that happen.

    But that's not all.  If I then simulate the response manually via the "Chat in Sim" button, I would expect the listen event to be invoked, but that doesn't happen either.  Not even when I change the channel to 0 in llListen, llDialog and the Chat box.

     
    • Benno Munster

      Benno Munster - 2008-09-04

      Additional info: the HTTP/RPC example does work, although execution never stops at a breakpoint in the sim event handler.  From this I conclude that the dialog sim event handler might also work, even though I don't see it, and that the real problem is somewhere in processing the dialog/chat response to trigger the listen event.

      By the way, is there any way to debug the sim event handler?  Or to produce log output from within the sim event handler?

       
      • None

        None - 2008-09-04

        Hi,

        The example has one problem, which is that in the simp file, the Avatar and the object are too far apart for chat to work.  The avatar is in the center of the sim (128,128,0), but the object is at the corner (0,0,0), which is out of chat range, so the dialog response isn't heard.

        Workaround: move the object to the center of the sim.

        I'll fix the example in the next release.

         
      • None

        None - 2008-09-05

        FYI - no the debugger doesn't 'see' the sim event handler (yet)...

         
    • Benno Munster

      Benno Munster - 2008-09-04

      Hmm, the object and the prim both have their own location properties and both are set to (128,128,0).
      Same as the avatar.

      How should I interpret the prim location?  Is that relative to the sim corner or to the parent object?

      If distance is the problem that could only be explained if the prim location is relative to the parent object.  In that case, the prim's location relative to the sim would be (256,256,0), which would indeed be too far from the avatar.  But then the example should work when I change the parent object location from (128,128,0) to (0,0,0), so that the prim's location relative to the sim is back to (128,128,0).  However, then the chat is still not heared.

      Even when I delete the object and add a new one at location (128,128,0) with prim location (0,0,0) and add the dialog script, it still does not work.

      Apart from that, there seems to be a problem with distance calculation anyway: when I move the avatar to (64,64,0) with the object at either (128,128,0) or (0,0,0), the no_sensor event is invoked even though the distance between the object and the avatar is 64*sqrt(2) = 90.5, which is within the sensing range of 96.
      But when I leave the avatar at (128,128,0) and move the object to (0,0,0), the sensor event is invoked while the distance is now 181, which is well out of range.
      Is this sensing problem related to the chat problem?

       
      • None

        None - 2008-09-04

        there's a different bug, it seems, with the computed position of the target.

        FYI how it should work:

        object position -> Sim relative position
        prim position -> relative to object, in object coordinates.  Root prim is therefore locked at (0,0,0).

        I will release the fix shortly.

         

Log in to post a comment.

MongoDB Logo MongoDB