Cool VL Viewer forum
http://sldev.free.fr/forum/

Radar sorting last entered the chat range
http://sldev.free.fr/forum/viewtopic.php?f=6&t=2274
Page 1 of 2

Author:  DonFranko [ 2022-05-19 11:52:12 ]
Post subject:  Radar sorting last entered the chat range

Hey there,

as a Live Artist in SL it would be cool to have a Radar feature to sort all avas after the time that they have entered the (extended) chat range. I actually haven't found it yet but it may already be implemented - is it?

Sunny greetings
Don

Author:  Henri Beauchamp [ 2022-05-19 12:08:08 ]
Post subject:  Re: Radar sorting last entered the chat range

This is an extremely niche feature... And no, it is not hard-coded into the viewer.

You could, however, use Lua scripting to implement it yourself. See the radar related callbacks, and specifically the OnRadar() one: associated with some minimal code to store the new incoming avatars together with a GetFrameTimeSeconds() time stamp in a Lua table, you could set up a Lua side bar button or chat trigger to display that table entries in the proper order (with either a "poor man" method by printing the names in chat, or with a luxury interface using a custom Lua floater with a sorted list)...

Author:  DonFranko [ 2022-05-19 12:42:56 ]
Post subject:  Re: Radar sorting last entered the chat range

mmhh.. what a pity.

I heard about that feature from people (mainly djs who use firstorm and who use it to say Hi to the new arrivers). The feature to get the info into the chat window is already installed in Coolviewer (I clicked it on in the main settings and it works) but as I'm singing and playing piano live I can't have a look at the chat window all the time, so that doesn't help.

I'll have a look into lua, but that would also only be a weak workaround as far as I can oversee it so far.

May I ask - as the info about the new entries is already implemented in the cool viewer, too - if you may want to consider creating a column in the radar window to use this given informations? That would be ofcourse awesome.

Whatever you decide, thank you very much for your help and very fast reply and.. for maintaining that really great viewer!

Author:  Henri Beauchamp [ 2022-05-19 12:52:12 ]
Post subject:  Re: Radar sorting last entered the chat range

DonFranko wrote:
May I ask - as the info about the new entries is already implemented in the cool viewer, too - if you may want to consider creating a column in the radar window to use this given informations?
Nope, sorry. My viewer is fast, because I always refused to add bloat to it. Exotic features will be omitted; I implemented Lua scripting for the very purpose of avoiding to implement such features in C++ code and slow down the viewer (or bloat its memory usage) as a result.

Author:  DonFranko [ 2022-05-19 12:54:49 ]
Post subject:  Re: Radar sorting last entered the chat range

Oki dokes. No problem. I clearly understand that

Author:  DonFranko [ 2022-08-31 12:24:46 ]
Post subject:  Re: Radar sorting last entered the chat range

Hello there.
Unfortunately I have to come back to that request as I'm just not good enough at Lua-Scripting. Is there any chance that somebody could and would do that script for me and could also implement a column in that list that contains the worn tags of all avatars? The last one is needed as I have to make heavy use of the auto-derender script that I've found here.

Many thanks in advance for your help!
Frank

Author:  DonFranko [ 2022-12-14 12:51:52 ]
Post subject:  Re: Radar sorting last entered the chat range

Hi!

Unfortunately I still couldn't figure out how to write 2,3,4 different informations in two,3,4 coloums of a new floating radar. I know how to add columns to that scripted floater and I know to gather some infos but the way that I found with the help of "|" is just not working.

Currently I'm putting it all (just my data to try) in one column with that command:
Code:
SetLuaFloaterValue("newRadar","radarscrolllist1",GetAgentInfo().display_name .. " - " .. GetAgentInfo().name .. " - " .. GetGroupName(GetAgentInfo().active_group_id))


This is the part of the floater_radar.xml:
Code:
   <scroll_list name="avatar_list"
          left="10" right="-10" top="-20" bottom="140" can_resize="true"
          column_padding="0" follows="left|top|bottom|right"
          draw_heading="true" multi_select="true" search_column="1"
          tool_tip="Hold down SHIFT or CTRL while clicking to select multiple avatars.">
      <column name="marked" label="Mark" width="12" tool_tip="Marked avatars"/>
      <column name="avatar_name" label="Name" width="260" tool_tip="Hold down SHIFT or CTRL while clicking to select multiple avatars."/>
      <column name="distance" label="Dist." width="48" tool_tip="Distance from your avatar (red=within chat range, yellow=within shout range, green=within draw distance)."/>
      <column name="position" label="Pos." width="20" tool_tip="Position (X, Y) within this sim, or general direction (cardinal point) for outside sims."/>
      <column name="altitude" label="Alt." width="20" tool_tip="Altitude"/>
   </scroll_list>



Please help to finally get these valuable infos during my live shows.

Many thanks in advance!
Frank

Author:  Henri Beauchamp [ 2022-12-14 15:42:53 ]
Post subject:  Re: Radar sorting last entered the chat range

DonFranko wrote:
Hi!

Unfortunately I still couldn't figure out how to write 2,3,4 different informations in two,3,4 coloums of a new floating radar. I know how to add columns to that scripted floater and I know to gather some infos but the way that I found with the help of "|" is just not working.

Currently I'm putting it all (just my data to try) in one column with that command:
Code:
SetLuaFloaterValue("newRadar","radarscrolllist1",GetAgentInfo().display_name .. " - " .. GetAgentInfo().name .. " - " .. GetGroupName(GetAgentInfo().active_group_id))


This is the part of the floater_radar.xml:
Code:
   <scroll_list name="avatar_list"
.../...

For a start, your custom floater definition should be named properly: floater_lua_newRadar.xml, if you want to use "SetLuaFloaterValue("newRadar" .../...".
Second, the scroll_list name should bear the same name as the one you are using in the SetLuaFloaterValue() function. So, either rename your scroll_list to scroll_list name="radarscrolllist1", or use: "SetLuaFloaterValue("newRadar","avatar_list", .../...". But I would advise you to instead use "list1" for that name, since, as specified in the documentation, the Lua engine will then take care for you about setting up everything for that list and the Lua OnLuaFloaterAction() callback (you will then be able to use that callback in your automation script to act upon a "commit" event on a list element).

Author:  DonFranko [ 2022-12-17 01:45:00 ]
Post subject:  Re: Radar sorting last entered the chat range

Thanks!
I did all but don't understand yet what that means:
"the Lua engine will then take care for you about setting up everything for that list and the Lua OnLuaFloaterAction() callback (you will then be able to use that callback in your automation script to act upon a "commit" event on a list element)."

Here is my current automation script that is working and shows me all the infos and all buttons work.
Code:
-- custom lua floaters (http://sldev.free.fr/forum/viewtopic.php?f=6&t=1736)
-- type in the chat: /lua OpenLuaFloater("newRadar")
function OnLuaFloaterOpen(name, parameter)
   print("Opened floater: " .. name .. " with parameter: " .. parameter)
   local StartTime = GetTimeStamp(-7,"%Y-%m-%d %H:%M:%S")
   print("StartTime at opening newRadar Floater: " .. StartTime)
   if name == "newRadar" then
      SetLuaFloaterValue("newRadar","lineedit1","2713ef76-7923-521c-8498-38b8647cf373")
--     SetLuaFloaterValue("newRadar","list1",GetAgentInfo().display_name .. " - " .. GetAgentInfo().name .. " - " .. GetGroupName(GetAgentInfo().active_group_id))
     SetLuaFloaterValue("newRadar","list1",GetAgentInfo().display_name .. " - " .. GetAgentInfo().name .. " - " .. GetGroupName(GetAgentInfo().active_group_id))
--     SetLuaFloaterValue("newRadar","list1", RadarAvatarsAtMyArrival)
     SetLuaFloaterCommand("newRadar","button1","SetLuaFloaterValue(GetFloaterName(),'inventory1',GetLuaFloaterValue(GetFloaterName(),'lineedit1'))")
      SetLuaFloaterCommand("newRadar","button2","print('Cancel');FloaterClose()")
     SetLuaFloaterCommand("newRadar","button3","print('OK');FloaterClose()")
     
    
   end
end


What I know need to know next is how to get the list1 arguments/data into the three or four columns instead of all just in column 1

Author:  Henri Beauchamp [ 2022-12-20 16:32:26 ]
Post subject:  Re: Radar sorting last entered the chat range

Your code just plain cannot work... You'd need to fill-up the list in a loop with all avatars present around you.

I'm afraid I cannot give you a Lua programming course in this forum.

Re-writing a full radar from scratch in Lua also seems like an overkill (and would slow down the viewer since you would need to refresh that radar list at least every second)...

EDIT: I will try to think about something to allow Lua to add some info to the normal Radar, on a per-avatar basis...

Page 1 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/