Animation Not working

For questions about using Classic.

Post » Sat Dec 28, 2013 3:24 pm

In this game,I don't think there's any way this should not work.I want the
Player to crawl.When The Down Arrow is down,it's OK but wheb left or right arrow is also down,the animation does not play and is stuck at the first frame.
Cap link:(]( http://www.2shared.com/file/wpKkZ3n8/Game.html ))'[Doc Ai2013-12-29 06:14:24
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Sun Dec 29, 2013 6:14 am

jfjf
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Sun Dec 29, 2013 11:15 am

Some one helpppppppp.....
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Sun Dec 29, 2013 2:19 pm

What's happening (I think) is that every tick the animation was switching to Crawling and then quickly switching to another animation and therefore never moved past the first frame.

It looks like two issues to me.

First, I think Construct was automatically setting the animations based on the platform behaviour. To fix this I renamed some of your animations so that they aren't considered default platform animation names.

Second, I changed your code so that it will only set the "Walking" and "Standing" animation when the down button isn't pressed.

I also added an event that will set the animation speed of the crawling animation so it doesn't animate when standing still.

Here's the cap: https://dl.dropboxusercontent.com/u/28484936/crawling_game.cap
B
21
S
5
G
3
Posts: 65
Reputation: 3,789

Post » Sun Dec 29, 2013 3:23 pm

@robit_studios
Thank you very much
To the naming part,I just noticed that your cap did not have any "tags" assigned to the animation.I just removed the tags in my cap's animation's (And fixed the code problem and added event as you told)and everything's fine.
What's the purpose for this "tag"s?Doc Ai2013-12-29 15:24:06
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Sun Dec 29, 2013 9:18 pm

@Doc Ai - The tags are used by built-in behaviors to change animation automatically for you (eg: The platform object for jumping, falling, moving, stopped). It saves you some events if you don't want to do anything fancy
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
116
S
40
G
17
Posts: 2,199
Reputation: 19,435

Post » Mon Dec 30, 2013 1:36 pm

@robit_studios
@Jayjay
Another problem has come.
I made the collision masks shorter so that the Player can crawl below the "platform".But if I release the down button while below the "platform",
The player suddenly starts from the starting position.

I think this is because the collision mask for standing overlaps the solid platform.
If he release the down button,I want the player not to stand but stop in the crawling state.(Do you know what I mean?)
What do I do?
I think I should use the "when ceiling just above" event and I don't know what action I should use.
Doc Ai2013-12-30 15:13:13
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Tue Dec 31, 2013 6:34 am

Some one help....
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Tue Dec 31, 2013 2:53 pm

I'd just put an invisible sprite there and say "while touching this - play crouch animation"
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit Dropbox is a pile of trash and if you need my old files PM me! :)
B
116
S
40
G
17
Posts: 2,199
Reputation: 19,435

Post » Tue Dec 31, 2013 3:54 pm

@Jayjay
That works.but When I press the jump button while below the platform,the same problem happens.
I don't want the player to automatically crawl.He should keep the down arrow down and if the platform is above,he can't jump and stand,walk.He should only be able to crawl.
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests