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

disarm_get_bone_sprite_width and disarm_get_bone_sprite_height #3

Open
YigitBudur opened this issue Oct 31, 2021 · 5 comments
Open
Labels
enhancement New feature or request

Comments

@YigitBudur
Copy link

Those 2 functions would be awesome as it would save us from the need to have the sprite in both the atlas and in the project.

@katsaii
Copy link
Owner

katsaii commented Nov 3, 2021

Can you give me an example of how this would be used? I'm not sure what purpose these functions could offer.

@katsaii katsaii added the enhancement New feature or request label Nov 3, 2021
@YigitBudur
Copy link
Author

YigitBudur commented Nov 3, 2021

Can you give me an example of how this would be used? I'm not sure what purpose these functions could offer.

In my case, I need these functions to create particles after a sword. So its like a slash trail. But I need to pass those length values to lenghtdir functions.

@katsaii
Copy link
Owner

katsaii commented Nov 3, 2021

You can currently get the bone width and height by accessing the bone data:

var bone = disarm_bone_get_data(arm, "bone name");
var length = bone.width;
var diameter = bone.height;

Hopefully this helps for now.

@YigitBudur
Copy link
Author

It does, thanks. Those functions were to make sense with the built-in GML functions for new users of Disarm

@YigitBudur
Copy link
Author

bone.width doesn't return the attached skin's width but just the bone width. Is there a way to do so? I need to know the equipped sword's image length(width) in my case

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

No branches or pull requests

2 participants