Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2017-08-23 11:42:00



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

Joined: 2016-06-19 21:33:37
Posts: 86
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: 3621
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: 86
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: 3621
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: 86
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: 3621
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: 86
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: 3621
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: 86
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
Display posts from previous:  Sort by  
Reply to topic   [ 79 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8

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.