Timers calling functions

Posted by Jlyrncher on Sat 14 Nov 2020 06:50 AM — 3 posts, 14,921 views.

#0
Can someone possibly post an example showing how to get a timer to directly call a function in a lua script?

I'm clearly doing something wrong. I'd like to not have to resort to sending an alias to get the function to be called.

Thanks in advance. :)
Australia Forum Administrator #1

I have a video about scripting.

You have two basic choices:

  • Use “send to script” in the timer and put your script code in the “send” box. This can directly do things, or call functions.

  • Leave the “send” box blank and put the name of a function in the “Script” box of the timer. Then that function needs to be implemented in a script file which is associated with that world file in the World Configuration -> Scripting -> Scripts configuration dialog.

#2
Thanks Nick!