Hello everyone; some time ago I made a sprite, and for some reason, a few images weren't saving when I closed the act editor, throwing a ton of animation work into trash. Every time I tried to add these images, after saving, they would just disappear. After some time I found that converting them to index8 kept them after saving, for some reason...
So the problem now is how to fix every frame in all actions, so they use the correct image:
here, in ID 2, 3 and 4, the sprite indexes need to be edited to have the original image, but I couldn't find any way to access specifically these IDs; I'm using a sample script modified from the documentation:
var layer = act.TryGetLayer(selectedActionIndex, selectedFrameIndex, 0);
if (layer != null) {
layer.SpriteIndex = 39;
}
Running that script modifies the sprite on ID 0 to be the 39, but I needed that the ID 2 to be changed.
So the question is: How can I make a script that will modify any ID, and not only the ID 0?
Thanks in advance!
Edit: It was so damn obvious ¬¬' thanks anyway
if anyone is wondering, the ID is the last parameter in TryGetLayer
Question
Gianluca280395
Hello everyone; some time ago I made a sprite, and for some reason, a few images weren't saving when I closed the act editor, throwing a ton of animation work into trash. Every time I tried to add these images, after saving, they would just disappear. After some time I found that converting them to index8 kept them after saving, for some reason...
So the problem now is how to fix every frame in all actions, so they use the correct image:
here, in ID 2, 3 and 4, the sprite indexes need to be edited to have the original image, but I couldn't find any way to access specifically these IDs; I'm using a sample script modified from the documentation:
var layer = act.TryGetLayer(selectedActionIndex, selectedFrameIndex, 0);
if (layer != null) {
layer.SpriteIndex = 39;
}
Running that script modifies the sprite on ID 0 to be the 39, but I needed that the ID 2 to be changed.
So the question is: How can I make a script that will modify any ID, and not only the ID 0?
Thanks in advance!
Edit: It was so damn obvious ¬¬' thanks anyway
if anyone is wondering, the ID is the last parameter in TryGetLayer
Edited by Gianluca280395Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.