Page 1 of 1

[0.17.14] 'custom-input' event don't fire while in spectator mode

Posted: Sun Mar 17, 2019 3:55 pm
by Earendel
While in spectator mode (defines.controllers.spectator), custom input events don't fire.

This might be desirable if all input events were exclusively game-world-affecting but that is always the case, they can be navigation-based too.

I need a player in spectator mode to be able to use shortcuts as it's critical to multi-surface navigation.

If the event were to fire the event handler has access to the player, so it can make the call whether to execute the normal code based on the controller mode.

Re: [0.17.14] 'custom-input' event don't fire while in spectator mode

Posted: Sun Mar 17, 2019 7:20 pm
by Klonan
Set the prototype flag:
`enabled_while_spectating = true`

Moving to modding help

Re: [0.17.14] 'custom-input' event don't fire while in spectator mode

Posted: Mon Mar 18, 2019 9:53 pm
by Earendel
Wow, already thought of.

Thanks.