Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: add syntax to allow adding event handlers directly. #212

Open
ir4ne opened this issue Aug 5, 2023 · 4 comments
Open

Suggestion: add syntax to allow adding event handlers directly. #212

ir4ne opened this issue Aug 5, 2023 · 4 comments

Comments

@ir4ne
Copy link
Contributor

ir4ne commented Aug 5, 2023

Suggestion: add syntax to allow adding event handlers directly.

Event handlers are probably the best feature that has been added to OBSE in recent years. However, unfortunately, it does not completely eliminate the need to use quest scripts for handling events: you still need to call SetEventHandler somewhere. I suggest making a syntax that would allow xOBSE to register handlers at game startup automatically, for example:

scn NewSyntaxExample

String_var filename

begin SetEventHandler_LoadGame { filename }
   ...
end
@llde
Copy link
Owner

llde commented Aug 6, 2023

Adding a block for every event is unfeasible unless I can patch the compiler to interpret that.
Otherwise we could rely on a begin OnEvent "event" filter1 filter2

@EdMSL
Copy link

EdMSL commented Oct 14, 2023

unless I can patch the compiler

Is it even possible?

@llde
Copy link
Owner

llde commented Oct 16, 2023

Possible is possible.

@EdMSL
Copy link

EdMSL commented Oct 17, 2023

It would be great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants