No idea, the search function on this website isn't all that great. It's a bit hit & miss half the time when you try searching for something specific.
Because there's only supposed to be one instance of all event handlers / listeners except the mainLoop event.
The general idea is that you create a single function for each event handler you create & then inside of that you can add if queries, lines of code & / or call other functions from inside of said function.
function mouseEvt(eventType, mousePosition)
if eventType == eEvtMouseWheelUp or eventType == eEvtMouseWheelDown then
-- mouse wheel was activated, do something
end
if eventType == eEvtMouseMove then
if game.CurrentScene:getName() == "test" then moveAnim() end
end
end
function moveAnim()
if ActiveAnimations["test"].AnimationCurrentPosition.x > 200 and ActiveAnimations["test"].AnimationCurrentPosition.x < 600 then
ActiveAnimations["test"].AnimationCurrentPosition = { x = (game.ScrollPosition.x + getCursorPos().x), y = 100}
end
end
registerEventHandler("mouseEvent", "mouseEvt")
... the example is a bit crude as I just wrote it mostly off the top of my head.