[SOLVED] Problems with animations in my mod

Post Reply
kogolbok
New member
Posts: 4
Joined: Thu Feb 08, 2018 19:37
GitHub: kogolbok

[SOLVED] Problems with animations in my mod

by kogolbok » Post

Hello. Sorry if I put this in wrong place, I am not sure, where my question fits better.

I am trying to make simple cat using this mod. Ido it for my daughters birthday. So, I took PilzAdam's mod, started cutting here and there, and adding my animations. And come to few questions. Please, help me, I couldn't find answers myself, there's almost no documentation (that mortals could understand).

First - I don't understand what 'speed_normal' and 'speed_run' do. with default settings (15) it was eating my animation. By experimenting I figured, that it's not speed, but frame count in animation, because cat started walking normally only when I set 'speed_normal' to actual walk animation lenght (in frames).

Second - Something with my 'sitting' animation. In attached files you can find blend file and see this animation in 514-705 frames range. Compare it to what you can see in the game. No matter what I set in it's "speed" parameter, it's still choppy. Can exporter eat my animation? I am using this plugin for exporting.

Here os my file (sorry, it's to big to post it here directly)

Thank you for this lovely game, that my children enjoys so much.
Last edited by kogolbok on Sun Feb 11, 2018 09:02, edited 1 time in total.

kogolbok
New member
Posts: 4
Joined: Thu Feb 08, 2018 19:37
GitHub: kogolbok

Re: Problems with animations in my mod

by kogolbok » Post

Oh... Please, remove my post, I had to double check everything before posting it. Everything is Ok now. Problem solved.

User avatar
TumeniNodes
Member
Posts: 2943
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: Problems with animations in my mod

by TumeniNodes » Post

glad you were able to solve this kogolbok,

if you could please,
maybe add just a quick post giving some information regarding what you did to solve the problem and

edit the title of the post by adding [SOLVED] at the begining, with brackets.

thank you
A Wonderful World

kogolbok
New member
Posts: 4
Joined: Thu Feb 08, 2018 19:37
GitHub: kogolbok

Re: Problems with animations in my mod

by kogolbok » Post

Ok.

First - "speed_normal" it's an animation speed. But if your animation doesn't fit between characters decisions to walk and to walk again, it starts from the beginning, so, it gets cut. Looking at thbs code:

Code: Select all

elseif type == "walk" and self.animation.current ~= "walk"  then
	if
		self.animation.walk_start
		and self.animation.walk_end
		and self.animation.speed_normal
	then
		self.object:set_animation(
			{x=self.animation.walk_start,y=self.animation.walk_end},
			self.animation.speed_normal, 0
		)
		self.animation.current = "walk"
	end
To me it should look like "if this animation parameters set, then if animation is not started, start it, if it is being played, just continue". But for my "birthday project" it's fine.

Second - I was setting wrong start point of "sitting" animation, I had to set it from point, where cat is standing and sits down. First I wanted to implement sitting down and standing up animation as intermidiate substate of "sitting" animation, But for that I would have to deeply rewrite logic of animation applying and characters states. This is to much for "birthday project", Daughter is allreadt happy, her frends ti, what else do I need? :)

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests