Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2022-10-06 04:01:20



Reply to topic  [ 5 posts ] 
Radar related Lua scripting help request 
Author Message

Joined: 2021-06-21 12:39:03
Posts: 58
Reply with quote
Hi @all!

As I'm just not good enough at Lua-Scripting (I tried and failed :( ) - is there any chance that somebody could and would do a script to have a Radar Floater with the following Columns to sort it:
1. Avatar's Name
2. Group Tag
3. Time of Arrival

using Henri's advice ("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)...")
The column "Group Tag" 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


2022-09-03 08:33:49
Profile

Joined: 2021-06-21 12:39:03
Posts: 58
Reply with quote
I just can't get it to work....

That one will put the name into Column 1:
SetLuaFloaterValue("newRadar","radarlist1",GetAgentInfo().id)

But that one will not put any data anywhere in the three coloums.. all blank.. why?

SetLuaFloaterValue("newRadar","radarlist1",GetAgentInfo().id|GetAgentInfo().active_group_id,|GetAgentInfo().active_group_id)


Attachments:
floater_lua_newRadar.xml [1.7 KiB]
Downloaded 8 times


Last edited by DonFranko on 2022-09-07 20:33:19, edited 2 times in total.

2022-09-07 16:57:09
Profile

Joined: 2021-06-21 12:39:03
Posts: 58
Reply with quote
Hi!

As I'm trying to get the special floater done I have to open it very often. i wanted to use a sidebar button to send the following text to the chat, but I cannot get it to work.. Only plain text is working.. how do I have to do do the code?

What I want to have posted through the click of a button is:
/lua OpenLuaFloater("newRadar")

Currently my code is: SideBarButton(2, "P", "SendChat('newRadar')", "Opens newRadar") but when I add /lua it's not working anymore.

Thanks in advance

Frank


2022-09-07 17:02:59
Profile

Joined: 2009-03-17 18:42:51
Posts: 5022
Reply with quote
DonFranko wrote:
Hi!

As I'm trying to get the special floater done I have to open it very often. i wanted to use a sidebar button to send the following text to the chat, but I cannot get it to work.. Only plain text is working.. how do I have to do do the code?

What I want to have posted through the click of a button is:
/lua OpenLuaFloater("newRadar")

Currently my code is: SideBarButton(2, "P", "SendChat('newRadar')", "Opens newRadar") but when I add /lua it's not working anymore.

Thanks in advance

Frank

Why are you trying to send a Lua command via the chat from a button ??? It won't work...
Simply add to your automation script:
Code:
SideBarButton(2, "P", "OpenLuaFloater('newRadar')", "Opens newRadar")


2022-09-10 09:38:24
Profile WWW

Joined: 2021-06-21 12:39:03
Posts: 58
Reply with quote
Quote:
Why are you trying to send a Lua command via the chat from a button ??? It won't work...
Simply add to your automation script:
Code:
SideBarButton(2, "P", "OpenLuaFloater('newRadar')", "Opens newRadar")


Oh, it's that easy? Thank you!


2022-09-12 00:51:38
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


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.