Can keys be bound to execute lua functions?

Discussion about Mods for Prison Architect

Moderator: NBJeff

ramma
level0
Posts: 5
Joined: Sat Jun 01, 2013 1:14 am

Can keys be bound to execute lua functions?

Postby ramma » Tue Sep 30, 2014 3:11 am

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!
Ekareya
level0
Posts: 4
Joined: Tue Sep 23, 2014 3:50 pm

Re: Can keys be bound to execute lua functions?

Postby Ekareya » Tue Sep 30, 2014 9:15 am

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.
learn_more
level1
level1
Posts: 36
Joined: Sun Sep 07, 2014 9:18 pm

Re: Can keys be bound to execute lua functions?

Postby learn_more » Wed Oct 01, 2014 1:20 pm

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)

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 1 guest