Open armandoalonso opened 4 months ago
if this also becomes available from the scripting api as a consequence of the runtime being shared that would also be pretty neat. it would allow the scripting api to mess with the flow of events.
@armandoalonso yeah, in theory any of the "SDK v2.0" feature request are actually scripting interface feature requests
if this also becomes available from the scripting api as a consequence of the runtime being shared that would also be pretty neat. it would allow the scripting api to mess with the flow of events.
Agreed, this would be very sick IMO
Reviewed guidelines
Checked for duplicate suggestions
Summary
Currently on the SDK v1.0 api Event sheet API is supported and accessible https://www.construct.net/en/make-games/manuals/addon-sdk/runtime-reference/event-sheet-classes/eventblock https://www.construct.net/en/make-games/manuals/addon-sdk/runtime-reference/event-sheet-classes/eventsheetmanager https://www.construct.net/en/make-games/manuals/addon-sdk/runtime-reference/event-sheet-classes/eventstack https://www.construct.net/en/make-games/manuals/addon-sdk/runtime-reference/event-sheet-classes/eventstackframe
Possible workarounds or alternatives
with the new sdk being limited by encapsulation, i don't think there is a workaround with bypassing encapsulation
Proposed solution
expose the event sheet api in the IRuntime
IRuntime.GetEventSheetManager() Return the EventSheetManager that handles the event system.
IRuntime.GetEventStack() Return the EventStack. This is a shorthand for GetEventSheetManager().GetEventStack().
IRuntime.GetCurrentEventStackFrame() Return the current EventStackFrame. This is a shorthand for GetEventSheetManager().GetCurrentEventStackFrame().
IRuntime.GetCurrentEvent() Return the current EventBlock. This is a shorthand for GetEventSheetManager().GetCurrentEvent().
Why is this idea important?
Addons need this information to properly implemtent thier own loops detailed here:
https://www.construct.net/en/make-games/manuals/addon-sdk/runtime-reference/event-sheet-classes/eventblock
Additional remarks
No response