xinfinite Posted January 18, 2023 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 1 Reputation: 0 Joined: 07/21/13 Last Seen: March 31, 2023 Share Posted January 18, 2023 Hi, I have little to no experience in coding but I try to learn through trial and error. I'm trying to write a simple script in Act Editor that adds Sprite Index number 116 to every frame of every action of an existing sprite. This is what I have so far, in which, it changed every layer to sprite number 116 with the offsets. foreach (var action in act) { foreach (var frame in action) { foreach (var layer in frame) { layer.SpriteIndex = 116; layer.OffsetX = 1; layer.OffsetY = -120; } } } I tried looking up the 'Help' section of Act Editor, but there isn't a section about Insert/Add new layers. Can anyone assist me with this? Thanks, Quote Link to comment Share on other sites More sharing options...
0 yodaGG Posted July 15, 2023 Group: Members Topic Count: 12 Topics Per Day: 0.01 Content Count: 53 Reputation: 0 Joined: 02/14/22 Last Seen: April 17 Share Posted July 15, 2023 hi bro.sory im not answr ur question i just want to ask how to put [selectedActionIndex] in ur script ? i wantt use ur script only in selected action Quote foreach (var action in act) { foreach (var frame in action) { foreach (var layer in frame) { layer.SpriteIndex = 116; layer.OffsetX = 1; layer.OffsetY = -120; } } } can someone help me please ? thankyou Quote Link to comment Share on other sites More sharing options...
Question
xinfinite
Hi, I have little to no experience in coding but I try to learn through trial and error.
I'm trying to write a simple script in Act Editor that adds Sprite Index number 116 to every frame of every action of an existing sprite.
This is what I have so far, in which, it changed every layer to sprite number 116 with the offsets.
I tried looking up the 'Help' section of Act Editor, but there isn't a section about Insert/Add new layers.
Can anyone assist me with this?
Thanks,
Link to comment
Share on other sites
1 answer 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.