With lua it is now possible to define functions on the fly. Before I waste a lot of time, can these function be called by a trigger? Ie. something along the lines of:
This is just a very basic example, but I'm looking to potentially define 100's of functions along these lines. Because they are all very similar, it would be one hell of a pain to write them all out, when I can just make a loop to create them all. They need to be able to be called by triggers however. Any ideas?
Thanks
<trigger
...
script="blahblah"
...
>
</trigger>
...
function dostuff()
doeslotsofstuff...
end
blahblah = dostuffThis is just a very basic example, but I'm looking to potentially define 100's of functions along these lines. Because they are all very similar, it would be one hell of a pain to write them all out, when I can just make a loop to create them all. They need to be able to be called by triggers however. Any ideas?
Thanks