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

BehaviorEvent requires running game for initialization #93

Open
alleew opened this issue Sep 8, 2023 · 0 comments
Open

BehaviorEvent requires running game for initialization #93

alleew opened this issue Sep 8, 2023 · 0 comments

Comments

@alleew
Copy link
Contributor

alleew commented Sep 8, 2023

The BehaviorEvent class requires a running game to initialize, as seen here in its on create block:

on create
GameStateManager manager
seconds = manager:GetGameDisplay():GetSecondsBetweenFrames()
end

This can cause crashes when using actions like AddBehavior on a Button in a Form. It's maybe not unreasonable for it to crash here, though if it does it could use a better error message. What behavior this ought to have is unclear but the current behavior is probably not it.

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

No branches or pull requests

1 participant