[WIP] Contra-like movement issues

For questions about using Classic.

Post » Wed Feb 12, 2014 3:47 am

Hey guys :)

I'm trying to work out movement like in Contra games, with 8 directional shooting, and I've come up with silly issue

My controls and animations are preety much ready, and everything works almost perfectly but this - after pressing Up Arrow the player's angle changes which allows user to shoot up, but then when player release Up, animation gets back to idle state but bullets are flying up instead of left/right.

Is there a condition which I can use so the bullets will lose their ability to change direction once they are shot?

My Events and screenshot of the issue
i60.tinypic.com/30mqv85.png
MrSheet2014-02-12 03:48:37
B
6
S
3
Posts: 9
Reputation: 862

Post » Sat Jul 12, 2014 6:32 pm

Hey
If someone was curious how I handled previous bullet issue - I've created another object just for gun, pinned it to the character and used events to point it to desired direction/angle. Works fine.

Now I have another issue.
In Contra there are two falling animations - one triggered when player jumps ("rolled" jump animation until player falls on the ground) and other when player walks off a floor edge (single frame from walking animation).

I'm trying to recreate this but so far without success.
Whenever I'm trying to make different animation played when player walks from a edge it interferes with rolled jump anim because condition "is falling" or "is not on ground" is triggered due to in game physics and rolled jump animation is played only to top arch of the jump.

Does anyone has any idea how to bypass this and set two different fall animations?
B
6
S
3
Posts: 9
Reputation: 862

Post » Sat Jul 12, 2014 8:43 pm

you could try,
is falling + is overlapping ground at offset (-10x, -5y) -> Set animation to "fall drop"

ELSE + is falling + is overlapping ground at offset(-10x, -5y) -> Set animation to "fall drop"

ELSE + is falling -> Set animation to "fall roll"

The conditions won't be exactly like that I think, but I think there is a check for overlapping at offset in CC. Hope that works!

Edit: Also add a check to all three to make sure the player isn't already playing animation "fall drop" or "fall roll", so it only triggers once each time they fall (make the drop off platform fall a looping animation even though it's a single frame).

And you might need to remove the tag "Falling" from the roll fall, since the events have to override it.
"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
121
S
41
G
17
Posts: 2,217
Reputation: 19,696

Post » Sun Jul 13, 2014 6:46 pm

Thanks Jayjay, but unfortunatelly it doesn't worked :(

Although I've made it differently :)

I've added a variable to the player called "is_jumping", and then my events looks like this

1. Player is on ground - set "is_jumping" to 0
2. Player is jumping - set "is_jumping" to 1
3. Player is falling :
- value "is_jumping" equal to 1 - play rolled animation
- value "is_jumping" equal to 0 - play standard animation
B
6
S
3
Posts: 9
Reputation: 862

Post » Mon Jul 21, 2014 9:36 pm

Hello again

I'm currently working on dying animation and I've encountered two issues:

1. When player hits killing block he's always knocked back to different distance.

2. When player collides with said block while jumping he's thrown very high in the air. See here
Image

While I could live with first thing, the second is really annoying and I really can't understand why this is happening. I tried using set air acceleration or jump strenght to 0 but this doesn't work.

This is how my events look
Image

Help with both issues will be much appreciated
B
6
S
3
Posts: 9
Reputation: 862


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 18 guests