Can't seem to make the sprite solid?

For questions about using Classic.

Post » Tue Sep 28, 2010 3:52 am

Hello all. I started using this program two days ago, so I'm pretty much a noob. Thought I'd start off by watching this video:
http://www.youtube.com/watch?v=y9vs494u4Ik

I did the steps and ended up with a sprite and a block. The sprite's supposed to LAND on the block, but instead, it goes right through it... What am I doing wrong? Thanks!

Here's the file:
http://www.mediafire.com/?acnzxldq3lunwzr
B
1
G
2
Posts: 6
Reputation: 637

Post » Tue Sep 28, 2010 7:05 am

[quote="TriLxS":2u51a3zr]Hello all. I started using this program two days ago, so I'm pretty much a noob. Thought I'd start off by watching this video:
http://www.youtube.com/watch?v=y9vs494u4Ik

I did the steps and ended up with a sprite and a block. The sprite's supposed to LAND on the block, but instead, it goes right through it... What am I doing wrong? Thanks!

Here's the file:
http://www.mediafire.com/?acnzxldq3lunwzr[/quote:2u51a3zr]

You seem to have imported an empty collision mask to your animations. Therefore there's nothing to collide with for your player sprite. So you have to reimport proper collision masks.

Also note that you don't have to check platform and solid. Either one will do. Platform allows the player to jump through from below and to fall down with down button if the option is active in the platform behavior.
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Tue Sep 28, 2010 11:20 pm

Uhm, so how do I make a proper collision mask..? :| Sorry, I'm kinda new at this. XD Can you edit it for me?

EDIT: Nevermind that! Got it working, the sprite's finally landing on the platform. But whenever it stops, it gets all jiggity and spasms. Not when it walks or anything. Here's the file:
http://www.mediafire.com/?n204qn9u4x0aysh
B
1
G
2
Posts: 6
Reputation: 637

Post » Wed Sep 29, 2010 4:14 am

The reason your sprite gets jittery is because your collision masks are inconsistent and because of that the collision mask keeps changing, which causes the sprites states to change. In one second the collision mask is not touching anything, making the sprite change to either jumping or falling.

I downloaded your cap and took a look at it, and made some changes to it (seems that the one I dl'ed is different/older than the one I get from your link now though, so keep that in mind)

There's two layouts in it. One where I just changed the hotspot of your sprite and another where I use another sprite, which is just a box, for the platform behaviour and control the animations of the character with events instead. I, and I think a lot of others, prefer doing it this way because although it's quick to get started using the animation tags, you'll soon want more control over the animations as your games get more complex.

http://www.box.net/shared/u9n8gdezec

I also noticed that you've set the "Walking/Running" as a sub-animation to "Jumping" in the latest cap. I'm not too experienced with sub-animations so I'm not entirely sure how to work with them, but I'm pretty sure that having walking as a sub-animation to jumping is something you don't want. Maybe someone knowledgable about the matter can chip in?
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Wed Sep 29, 2010 11:29 pm

I think I'm doing something wrong... Whenever the sprite runs back and forth, it always starts with the "falling" animation for a split second. ALSO, after deleting one frame from "falling", the sprite starts getting jittery again. Is this a glitch or...?

EDIT: Huh, added a frame for "walking/running", now the sprite's doing a short jump every 3 seconds it walks... Here's the file...

http://www.mediafire.com/?52qc18ckl4a2ve7

:( So frustrating...
B
1
G
2
Posts: 6
Reputation: 637

Post » Thu Sep 30, 2010 2:29 am

Your collision mask is still inconsistent.

Ok, let's tackle this more visually then.

Bigger version here: Link.

A side note: why do you have 14 identical frames in the stopped animation?
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Thu Sep 30, 2010 2:51 am

Thank you! I didn't understand what it was before I read that :lol:

Btw, the 14 frames look similar, but they aren't. If you preview it, her visor will be flashing on and off.
B
1
G
2
Posts: 6
Reputation: 637

Post » Thu Sep 30, 2010 3:04 am

Ah, I see. The change is so miniscule that it was practically impossible to see from the preview icons.

But, still, there are plenty of unnecessary frames there. Only 4 of the frames are really needed and you can just change the speed of the animation and frames to get the desired effect instead of having more frames than necessary.

Anyway, glad I could help.
B
73
S
20
G
10
Posts: 524
Reputation: 9,896


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests