Posted 22 October 2015 - 09:23 AM
So, I made a tool where you can have an event listener thats easy to use (and inspired by JavaScript), you just do the following.
You don't need to follow it exactly, its just so you know how to use it without having to read the code. Its mainly for use so you don't have to have a ton of if's and elseif's in say like, an OS. You just need one function with a sub function. It runs with coroutines so you just have to make another coroutine with your main code in it, or since this is event driven have it just run off of the event listeners. So yeah. Credit would be nice, if you use it, but it's free use. Without further adieu, pastebin get s5VHjhkz [name]
addEventListener(function(param1,param2,param3,param4,param5) --[[Do Stuff with the passed arguments]] end,"an event")
You don't need to follow it exactly, its just so you know how to use it without having to read the code. Its mainly for use so you don't have to have a ton of if's and elseif's in say like, an OS. You just need one function with a sub function. It runs with coroutines so you just have to make another coroutine with your main code in it, or since this is event driven have it just run off of the event listeners. So yeah. Credit would be nice, if you use it, but it's free use. Without further adieu, pastebin get s5VHjhkz [name]
Edited on 22 October 2015 - 07:55 AM