This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
H4X0RZ's profile picture

create an event

Started by H4X0RZ, 11 June 2013 - 02:10 PM
H4X0RZ #1
Posted 11 June 2013 - 04:10 PM
How can I create an event so I can detect it with

p1,p2,p3 = os.pullEvent("someEvent")
???
danny_delmax1 #2
Posted 11 June 2013 - 04:18 PM
you would use os.queueEvent("someEvent", p1, p2, p3)
billysback #3
Posted 11 June 2013 - 04:26 PM
edit; never mind I didn't forgot there was a function called "queueEvent"
theoriginalbit #4
Posted 11 June 2013 - 09:05 PM
Also just to extend on what danny_delmax1 posted, the parameters you queue can be of any type, they do not have to be strings and numbers, you can also queue tables and even functions.
PixelToast #5
Posted 11 June 2013 - 09:14 PM
afaik you cant queue events with tables
the only event you would ever receive with a table is timer
theoriginalbit #6
Posted 11 June 2013 - 09:45 PM
last I tried it worked.