Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2018-09-21 00:25:39



Reply to topic  [ 82 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9  Next
Lua scripting related requests 
Author Message

Joined: 2016-06-19 21:33:37
Posts: 104
Location: San Francisco bay area, CA, USA
Reply with quote
I was mostly curious. I could/can deal with the form as it is. It was just a combination I hadn't expected.


2017-06-11 13:14:42
Profile

Joined: 2009-03-17 18:42:51
Posts: 3833
Reply with quote
ZaneZimer wrote:
I was mostly curious. I could/can deal with the form as it is. It was just a combination I hadn't expected.

Just a matter of convention... I had to adopt one, which is indeed totally arbitrary. :D


2017-06-11 13:59:16
Profile WWW

Joined: 2016-06-19 21:33:37
Posts: 104
Location: San Francisco bay area, CA, USA
Reply with quote
I have found that the chat type returned in OnReceivedChat() can contain CHAT_TYPE_DIRECT = 9. This seems to come from prims/objects with llInstantMessage() used within them. The id then seems to be the owner of the prim/object and name is the name of the prim/object. The documentation listed at: Lua scripting and viewer automation feature seems to indicate otherwise. I found that chats using llInstantMessage() weren't being processed by my Lua script because I wasn't handling type '9'.


2017-07-23 18:17:19
Profile

Joined: 2009-03-17 18:42:51
Posts: 3833
Reply with quote
ZaneZimer wrote:
I have found that the chat type returned in OnReceivedChat() can contain CHAT_TYPE_DIRECT = 9. This seems to come from prims/objects with llInstantMessage() used within them. The id then seems to be the owner of the prim/object and name is the name of the prim/object. The documentation listed at: Lua scripting and viewer automation feature seems to indicate otherwise. I found that chats using llInstantMessage() weren't being processed by my Lua script because I wasn't handling type '9'.

Well, like I wrote in the documentation:
Quote:
OnReceivedChat(type, from_id, is_avatar, name, text) is called each time the viewer receives a chat line. 'type' is a positive number (corresponding to the e_chat_type enum in indra/newview/llchat.h)

So, to get the full list (beside the main examples I gave), you'll have to look into that source file... The same thing goes for all the functions where I give a source file pointer in the Lua doc...


2017-07-23 21:55:28
Profile WWW

Joined: 2016-06-19 21:33:37
Posts: 104
Location: San Francisco bay area, CA, USA
Reply with quote
I do use the header files and I even copy the names and values to comments in my automation script for quick reference. I am only referencing
Quote:
1 for normal avatar chat or scripted objects llInstantMessage()
where llInstantMessage() is described as being 1 for normal chat. I believe the callback behavior is correct and am perfectly happy with it. :-)


2017-07-23 22:18:34
Profile

Joined: 2009-03-17 18:42:51
Posts: 3833
Reply with quote
ZaneZimer wrote:
I do use the header files and I even copy the names and values to comments in my automation script for quick reference. I am only referencing
Quote:
1 for normal avatar chat or scripted objects llInstantMessage()
where llInstantMessage() is described as being 1 for normal chat. I believe the callback behavior is correct and am perfectly happy with it. :-)

Documentation updated/fixed.


2017-07-29 08:05:15
Profile WWW

Joined: 2016-06-19 21:33:37
Posts: 104
Location: San Francisco bay area, CA, USA
Reply with quote
Henri Beauchamp wrote:
Documentation updated/fixed.
Thanks Henri.

I was looking at the Lua Pie Menu functions that you have made available. I have read the documentation and I don't believe it is possible to do 'nested' menu items (like the native browser pie support), correct?


2017-07-31 04:24:26
Profile

Joined: 2009-03-17 18:42:51
Posts: 3833
Reply with quote
ZaneZimer wrote:
I was looking at the Lua Pie Menu functions that you have made available. I have read the documentation and I don't believe it is possible to do 'nested' menu items (like the native browser pie support), correct?
If by "nested", you mean sub-menu pies, then yes, you are correct. One possibility to obtain something in that vein, would be for you to simply dedicate a pie slice to a "pie toggle" item, that would change the Lua pie; but you'd have to re-pick (SHIFT+right click) on the object a second time to get the redefined pie to appear.


2017-07-31 07:52:39
Profile WWW

Joined: 2016-06-19 21:33:37
Posts: 104
Location: San Francisco bay area, CA, USA
Reply with quote
Henri Beauchamp wrote:
If by "nested", you mean sub-menu pies, then yes, you are correct. One possibility to obtain something in that vein, would be for you to simply dedicate a pie slice to a "pie toggle" item, that would change the Lua pie; but you'd have to re-pick (SHIFT+right click) on the object a second time to get the redefined pie to appear.
I had also thought of your suggestion or using the slice to open a dialog detailing a list of options, selected by a numerical index. I'm just pondering ideas. I have no real need for such a structure yet.


2017-07-31 13:03:55
Profile

Joined: 2016-06-19 21:33:37
Posts: 104
Location: San Francisco bay area, CA, USA
Reply with quote
GetAgentInfo() and control_flags:

I've been trying to determine if there is a way to distinguish between sitting on an object vs sitting on the ground. I know GetAgentInfo() provides the `sitting` Boolean, but it is for any type of sit. I thought perhaps the control_flags could indicate this distinction, since indra/llcommon/llagentconstants.h contains AGENT_CONTROL_SIT_ON_GROUND. I'm likely misinterpreting what that flag is used for and/or means, as I have only found it in use at line 5457 in indra/newview/llviewermenu.cpp. A little tracing makes it seem like that flag means that I think it does, but I didn't go too far. I have also tried the various ways to sit on the ground, including the AgentSit() method but the control_flags remain 0 while sitting. I have used AGENT_CONTROL_AWAY from control_flags successfully, however, so I know some of the flags are as I expect them. Cheers and thanks for reading.


2018-07-08 18:27:19
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 82 posts ]  Go to page Previous  1 ... 5, 6, 7, 8, 9  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.