Page 1 of 1

Can keys be bound to execute lua functions?

Posted: Tue Sep 30, 2014 3:11 am
by ramma
As the subject says, I'm curious is binding keys to execute lua scripts is possible right now. If so, can anyone provide an example? I'm having difficulties finding any reference to setting keybinds in the modding documentation.

Thanks!

Re: Can keys be bound to execute lua functions?

Posted: Tue Sep 30, 2014 9:15 am
by Ekareya
If it's possible you wo'nt find that in the modding documentation. you may find what you are looking for in a lua tutorial though.

Re: Can keys be bound to execute lua functions?

Posted: Wed Oct 01, 2014 1:20 pm
by learn_more
i have compiled a list of all available functions i could find from lua,
i did not see anything related to binding keys.

viewtopic.php?f=43&t=50165

also a note: lua does not run continually,
at startup it parses the mission script, then lua only gets called on events that are registered by the mission.

(usually lua bindings in games have a sort of 'tick' function that is called every game frame, but that doesnt seem to be the case here)