Help with platformer and animations.

For questions about using Classic.

Post » Thu Jun 04, 2009 9:39 am

Hey guys, Construct newbie here. I've got a platformer character, and I can get him to shoot when I press spacebar. It goes to the animation, but it doesn't play, it just stays on the first frame. And when I press down spacebar the bullets are supposed to spawn but they don't. Any help?

Thanks in advance.

(I can't figure out how to attach stuff, so I just uploaded it somewhere else)

http://www.mediafire.com/?kxneljuzzww
B
55
S
12
G
8
Posts: 339
Reputation: 9,314

Post » Thu Jun 04, 2009 9:48 am

There's a few problems here which I'll go through:

You don't need the set animation speed, you can set animation speed via properties by clicking an animation angle.

Your stopped animation is tagged, so the behavior will reset the animation whenever the character isn't moving.

You don't need separate animations for directions; just have 1 'Walking' animation and have 2 different angles for it.

The main problem is that all the animations are sub-animations. This is stopping them playing properly, so you should just create them normally. Right click a blank area of the tree and 'add new animation'. You can copy the old frames in.

I managed to get it working after those :).
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Thu Jun 04, 2009 9:53 am

Thanks Rich! Quick reply.

[EDIT]

http://www.mediafire.com/?iml1ddyzryt

Okay, I tried to follow all your points.

So now it's not working much, I tried to do what you said with the angles for the walking but I don't think I'm doing it right...

And now the "shoot" animation doesn't play at all, and I can't get it to spawn my bullets.

So yes, I think I need help...
B
55
S
12
G
8
Posts: 339
Reputation: 9,314

Post » Thu Jun 04, 2009 2:57 pm

The shooting animation is being continuously set to play with your events. You should replace the 'control is down' with 'control is pressed', then it'll only play when you press shoot, which I imagine is how you intend it.

The walking animations playing weirdly appears to be a bug with tagged animations, you should report that. For now, turn the walking tag off and set the animations for walking manually. You should have events to set the angle to 0 or 180 depending on what button's pressed, for the directions.

The bullet isn't spawning because you have 'invisible on start' ticked with it.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sat Jun 06, 2009 1:13 pm

Hmm ok so I've made a fair bit of progress. But now, when you shoot and reload about 2-4 times, it crashes, and I have no idea why, the error message just says something about debugging which doesn't really help me much. Anyway, hopefully someone has encountered this sort of thing before.

But anyway, Construct is awesome, and this is the furthest I've gotten into a gaming project and it's been only two days, so yeah, it's pretty damn cool.

.cap:

http://www.mediafire.com/?tttghem0mwq
B
55
S
12
G
8
Posts: 339
Reputation: 9,314

Post » Sun Jun 07, 2009 5:45 am

Okay, fixed it, it had something to do with having python scripting enabled. Thanks for your help.
B
55
S
12
G
8
Posts: 339
Reputation: 9,314

Post » Sun Jun 07, 2009 9:28 am

You should report every crash you get, they're always bugs.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests