Logic Machine Forum
Event Script - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Event Script (/showthread.php?tid=5715)



Event Script - tomnord - 01.11.2024

when using event script, we use the event.getvalue() function.
Is there any way to get the grp name in event script?


RE: Event Script - Daniel - 01.11.2024

https://kb.logicmachine.net/libraries/lua/#grpfindalias


RE: Event Script - tomnord - 01.11.2024

But that recuires me to know the GA address, can i get that without manually entering it?

Also, is there any way to copy event scripts to multiple GA?


RE: Event Script - admin - 01.11.2024

event.dst contains the group address that triggered the script. Use tags to assign a single script to multiple groups.


RE: Event Script - tomnord - 01.11.2024

tag based wont work with eventbased, or am i missng something?


RE: Event Script - Daniel - 01.11.2024

It will, just tag your objects. Create event script with this tag. Drop this and start writing to your objects. See what happens in logs
Code:
log(grp.find(event.dst).name)



RE: Event Script - tomnord - 01.11.2024

(01.11.2024, 09:20)admin Wrote: event.dst contains the group address that triggered the script. Use tags to assign a single script to multiple groups.

(01.11.2024, 10:37)Daniel Wrote: It will, just tag your objects. Create event script with this tag. Drop this and start writing to your objects. See what happens in logs
Code:
log(grp.find(event.dst).name)

I got the event.dst to work, but I wanted to copy my event script to multiple group adresses, preferably automated copy.


RE: Event Script - Daniel - 01.11.2024

Do not copy, use tag and single script for all.


RE: Event Script - tomnord - 01.11.2024

(01.11.2024, 10:45)Daniel Wrote: Do not copy, use tag and single script for all.

Ah, I see. As resident script then?


RE: Event Script - Daniel - 01.11.2024

Can you explain in more details what are you trying to do?