You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to subscribe to the mouse button events. I initially tried the Ext.Events.EclLuaMouseButton and Ext.Events.MouseButtonEvent (I looked in the code and saw a ThrowEvent for "MouseButtonEvent" and Ext.Events.EclLuaKeyInput didn't work, but Ext.Events.KeyInput did).
Both Ext.Events.EclLuaMouseButton and Ext.Events.MouseButtonEvent generated the message:
Attempted to subscribe to nonexistent event: ...
Can those events only be subscribed to once an event of the given type has occurred? I had previously tried to bind to viewport resized to scale my UI, but also failed with the same reason.
Indications
The log is reporting it cannot bind to events, though the name I'm attempting to bind to may be incorrect. What was in ExtIdeHelpers.lua didn't work, the code reference only worked for KeyInput (which I think is because I pressed keys during startup to tab between windows), and I didn't find online documentation with working information.
Ahh, I managed to get the controller axis, controller button, and key input working, but the controller axis doesn't allow preventing the action. I suspect the mouse would be the same. I was hoping to reduce game interaction while the UI was up so you can't trigger unexpected events while the screen is partly covered. I'm not sure what a good solution to that would be.
I have attempted solutions to common problems
Yes
I have checked that my game version is supported
Yes
OS
Windows 10
Platform
Steam
Description
I'm trying to subscribe to the mouse button events. I initially tried the Ext.Events.EclLuaMouseButton and Ext.Events.MouseButtonEvent (I looked in the code and saw a ThrowEvent for "MouseButtonEvent" and Ext.Events.EclLuaKeyInput didn't work, but Ext.Events.KeyInput did).
Both Ext.Events.EclLuaMouseButton and Ext.Events.MouseButtonEvent generated the message:
Attempted to subscribe to nonexistent event: ...
Can those events only be subscribed to once an event of the given type has occurred? I had previously tried to bind to viewport resized to scale my UI, but also failed with the same reason.
Indications
The log is reporting it cannot bind to events, though the name I'm attempting to bind to may be incorrect. What was in ExtIdeHelpers.lua didn't work, the code reference only worked for KeyInput (which I think is because I pressed keys during startup to tab between windows), and I didn't find online documentation with working information.
Diagnostic Files
No response
Steps to Reproduce
local function OnMouseButton(e)
_D(e)
end
Ext.Events.EclLuaMouseButton:Subscribe(OnMouseButton)
Expected Behavior
The event is registered successfully, and the function is called when those events occur.
Actual Behavior
Attempting to register an event results in an error.
The text was updated successfully, but these errors were encountered: