Jump to content
  • 0
BugMeNot2014

Act editor remove all frames script

Question

Can somebody help me with such script ? I need to remove all frames from particular animation, or even better, remove all frames, from all animations

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

There are many ways to achieve that:

foreach (var action in act) {
	action.Frames = action.Frames.Take(1).ToList();
}

If you need more... "control" with indexes and which animations to remove exactly, you can do it this way too:

for (int aid = 0; aid < act.Actions.Count; aid++) {
	for (int fid = act.Actions[aid].Frames.Count - 1; fid >= 1; fid--) {
		act[aid].Frames.RemoveAt(fid);
	}
}

If you want to apply this to a batch of files, you can do it this way too:

var path = @"C:\Sprites\";

foreach (var file in Directory.GetFiles(path, "*.act")) {
	var actFile = new Act(file);
	
	actFile.Actions.ForEach(p => p.Frames = p.Frames.Take(1).ToList());
	actFile.Save(file);
}

 

Link to comment
Share on other sites

  • 0

you ask for spriting item or script ?

please more info

not everyone can understand what you are saying

Link to comment
Share on other sites

  • 0

yes, sorry. 

https://prnt.sc/26dzglm

For example in act editor, for each animation, there are 8 directions, for each animation(idle, moving, attacking) in each direction, there are some frames(different frame count for different mobs). So I want to remove all frames from all animations from all directions.

So it will be 1 frame (it actually showing 0 frames) for each direction, for each animation. 

Right now Im doing this manually by hands, but I think for such repititive actions should be some automatisation 

bump

Link to comment
Share on other sites

  • 0
On 1/15/2022 at 8:50 PM, BugMeNot2014 said:

yes, sorry. 

https://prnt.sc/26dzglm

For example in act editor, for each animation, there are 8 directions, for each animation(idle, moving, attacking) in each direction, there are some frames(different frame count for different mobs). So I want to remove all frames from all animations from all directions.

So it will be 1 frame (it actually showing 0 frames) for each direction, for each animation. 

Right now Im doing this manually by hands, but I think for such repititive actions should be some automatisation 

delete manual with CTRL+DEL every frame anda save .act

copy .act file and rename file to other sprite 

maybe can work

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.