Platform enemy Jumping Movement

For questions about using Classic.

Post » Sat Dec 10, 2011 11:53 pm

Hi, I'm having some trouble in making my game again, and this involves something a bit... odd that I want my enemy to do.

Basically, I'd like my enemy to be bouncing around in horizontal directions depending on where the player is (If they're close enough). Now for the complicated part, the enemy is going to be changing sprites in mid-air to reflect what they're doing. The best way I can describe the motion I'm looking for is like how a slinky moves when they're going down stairs, except of course there's no stairs involved here.

I'm having trouble describing the motion I'm looking for, so I took the liberty of drawing a stick figure showing the motion :



I have attempted giving the enemy a Bounce behavior, but it always acts strange when I add it in. Usually it'll bounce in the air off of nothing, which I don't think is supposed to happen...

Here's the .cap if anyone needs it: http://dl.dropbox.com/u/42313097/Boss%20Man%20V19.cap

For reference, the enemy I'm talking about in the cap is called LL_SuckUp.

Any ideas? Jim152011-12-10 23:55:10
B
16
S
2
G
1
Posts: 156
Reputation: 2,112

Post » Mon Dec 12, 2011 1:45 am

Okay, so I've got the jumping movement down, but like I feared, the animation is a problem. I tried giving the enemy a private variable to determine which animations he'll use. He basically has 2 idle positions, 2 jumps, and 2 falling animations. I figured if the private variable changed while he was falling, I could get a different animation with each time the enemy jumps, like in the stick figure picture I drew above.

But for whatever reason, these commands seem to be ignored and just play the idle and jump animations. No falling animation and none of the alternate animations play. I feel like I'm missing something simple here... can anyone help?

Here is an updated .cap:

http://dl.dropbox.com/u/42313097/Boss%20Man%20V26.cap

EDIT: I've found a temporary work around by simply applying the sprites as one animation and trying to match up the frames to where they should be. It's not the best result, so if anyone could still help me out, I'd appreciate it. Jim152011-12-12 02:37:27
B
16
S
2
G
1
Posts: 156
Reputation: 2,112


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests