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

Implement convenient API for changing animations from C++ scripts #86

Open
ImmutableOctet opened this issue Jul 15, 2024 · 0 comments
Open
Assignees
Labels
C++ Script API Feature New feature or request Idea Ideas, concepts, etc. (for features without a clear scope yet) module: engine For features that involve the `engine` module. (optional)

Comments

@ImmutableOctet
Copy link
Owner

This would be something like:

set_animation("animation_name_here"_hs)

This could also be extended to support setting different animation layers:

set_animation("upper_body_animation_here"_hs, AnimationLayer::UpperBody);

In addition to a set_animation API, a really convenient option would be an assignment-based wrapper interface:

animation = "animation_name_here"_hs;
animation.upper_body = "upper_body_animation_here"_hs;

if (auto some_other_entity = co_await get_entity("some_other_entity_name"_hs))
{
	if (some_other_entity.animation == "some_animation"_hs)
	{
		// ...
	}
}
@ImmutableOctet ImmutableOctet added Feature New feature or request Idea Ideas, concepts, etc. (for features without a clear scope yet) module: engine For features that involve the `engine` module. (optional) C++ Script API labels Jul 15, 2024
@ImmutableOctet ImmutableOctet self-assigned this Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ Script API Feature New feature or request Idea Ideas, concepts, etc. (for features without a clear scope yet) module: engine For features that involve the `engine` module. (optional)
Projects
None yet
Development

No branches or pull requests

1 participant