How to get sprite ID from object

Im japanese, so I’m not good at english and I may use wrong English…

By the way, I want to get sprite id from script. (“sprite” does not mean “Default Animation”)
For example, I want to get “/main/assets/items/items.atlas#hemp” from “item.script”

1 Like

So basically you want which animation the sprite has currently? If that’s the case, then I’m afraid it’s not possible.
Moreover, you can’t get animations like this.

,Atlas * things are not accessible from script directly. You can only call them from sprite.play_flipbook or play_animation message.
What you can do, us to make a table with all you animation names in it, and use it todo whatever you want to.

2 Likes

Oh…It’s not possible…
I’m going to try another method !

Thank you for replying! :smiley:

1 Like

I’m sorry asking again…

Can I get object name?
(It’s not hash)

go’s name? You can get it using go.get_id() but it returns id as a hash. Maybe you just use it as a hash, or other way, if you want it to be a string, you can store it in a variable (since you know the go’s name)

local my_go = "hemp"
2 Likes

i can use it as string if i store it in a variable!
Thank you for your support!!

2 Likes