This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
api:event [2016/06/16 08:14] payonel |
api:event [2017/01/08 03:24] byteoflogic Unbalanced parenthesis on function documentation "event.pullFiltered" |
||
---|---|---|---|
Line 48: | Line 48: | ||
To only pull clicks by player "Steve" you'd do: | To only pull clicks by player "Steve" you'd do: | ||
`local _, x, y = event.pull("click", nil, nil, "Steve")` | `local _, x, y = event.pull("click", nil, nil, "Steve")` | ||
- | - `event.pullFiltered(([timeout: number], [filter: function]): string, ...` (Since 1.5.9) | + | - `event.pullFiltered([timeout: number], [filter: function]): string, ...` (Since 1.5.9) |
Pulls and returns the next available event from the queue, or waits until one becomes available but allows filtering by specifying filter function. | Pulls and returns the next available event from the queue, or waits until one becomes available but allows filtering by specifying filter function. | ||
**timeout** - if passed the function will wait for a new event for this many seconds at maximum then returns `nil` if no event was queued during that time.\\ | **timeout** - if passed the function will wait for a new event for this many seconds at maximum then returns `nil` if no event was queued during that time.\\ |