script.get_event_id("string")
Posted: Fri Apr 07, 2017 3:42 am
script.get_event_id("string") returns the event id associated with the custom-input name (and other possible events in .15 that are set with string)
Simple use case
Simple use case
Code: Select all
local run = function(event)
if event.name = script.get_event_id("my_control_up") then
--really why is it event.name when name is thought of as a string. event.id would be a much better choice for this.
elseif event.name = script.get_event_id("my_control_down) then
end
end
script.on_event({"my_control_up", "my_control_down"}, run)