How do I Make My 8 Direction Character Jump? *Capx Included*

Get help using Construct 2

Post » Thu Mar 27, 2014 12:16 pm

https://db.tt/HwdBOUM6

Hi everyone,I have an issue that i can not figure out and i was wondering if someone could give me a hand.
Im trying to make my player perform a Jump while using 8Direction Behaviour. I was looking to create some movement similar to Double Dragon. I really cant not figure this out and have scrapped my code for the 5th time,i was hoping someone could give me a hand and show me how to make it.The URL above is the capX file.Thanks
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Thu Mar 27, 2014 4:02 pm

Am I correct when I don't see any events on your event-sheets?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Mar 27, 2014 7:10 pm

@LittleStain,Yes i wiped my controls before i posted this,I only am looking for help on how to make my 8 direction character jump.I understand a good deal of how things work and usually its from watching a teacher or a tutorial of some sort.That has helped me on my learning curve.Everything i have seen so far has no demo and or makes very little sense to me,Or the capX tutorial files are 404 ,all im asking is for a hand thats all.I would be very grateful.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Thu Mar 27, 2014 9:49 pm

Ok so here's my version I hope it helps you out a bit tho.
Download CApx

I hope this helps clear things out a bit or at least point you in the direction you want.

I used a keyboard control but if you had another type of control in mind it's easily adaptable.
(keys to move around and shift to "jump" which actually sets a jump variable to 1 and plays a jump animation which you can use as a "bypass" for obstacles or such...)

Took the liberty of making the little dude "animated" for dramatic effect and testing.
Freefall Bird
B
47
S
9
G
5
Posts: 280
Reputation: 5,781

Post » Fri Mar 28, 2014 5:33 am

@Ragevortex Thank you for making this capX file and thanks for taking all the time you did to create the animated version,you didnt have to go that far but im very grateful to have gotten your help,The main thing i have questions about from seeing this is how do i actually mke my character jump Upwards? I know and understand how to change animation frames.The platformer behaviour has a simulate jump feature which made it so we never learned how to do it ourselves.Why cant this be added to 8direction??
im having such a hard time with this.
@LittleStain I dont want to make people feel like they are making my game, when you really have no clue about how to make something work and its something as miniscule as jumping......jumping of all things,this is almost a need for any game not just platformers.i feel pretty bad that i cant even make my 8 direction character jump.
GMO FOOD = DEATH
B
23
S
9
G
5
Posts: 567
Reputation: 6,368

Post » Fri Mar 28, 2014 7:37 am

@RookieDev

Actually, your question has come up multiple times on this forum and no one size fits all solution has been found.
As far as I understand the 8-direction-behaviour was intended for top-down-view games and therefor has not got this jumping functionality implemented.
Best way I can think of to create stuf like this is having a "Feet-touch-ground"-sprite with the 8 direction behaviour and a seperate sprite with the character/animations..
You could have the feet touch ground sprite to be the shadow of the character..
In normal circumstances the character while being on the ground would follow the feet touch ground sprite and when jumping the two would be seperate..
Giving the character some sort of x and y-vector movement and having it land back on the shadow.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Mar 28, 2014 2:06 pm

My "solution" works for the original topic genre...(albeit its not the most ideal of solutions)
The way I'd do it with that "animated" solution would be to set the origin of the character to the bottom and animate the height I'd want him to jump. because I'm combining the "when animation is playing" and a "is jumping" variable you can use the variable to bypass objects (remembering to set the collision polygon of your character" so that the "space" underneath is registered as non colliding space.
as @LittleStain mentions a way of tracking "touchdown" is always helpfull. Usually in games like double dragon they'd use the character shadow to give the player feedback on where the character actually was when jumping. Using a separate sprite can give you a better range of movement ... tracking the player when a boss bats him off the screen top... for example :)

@RookieDev
I do agree they need to add a simpler way to do this. I'm certain there's like a million ways to do it including even "shooting" the character upwards with a bullet behavior. or even physics which is a bit too complex IMHO.

Also I did update the capx with the shadow sprite and the "jump" animation on single standing jump
Freefall Bird
B
47
S
9
G
5
Posts: 280
Reputation: 5,781

Post » Mon Mar 31, 2014 5:13 am

@RookieDev
@LittleStain
@Ragevortex

HEY GUYS! I found the CAPX file that was randomly placed among the forums, I knew I had seen it ages before, but it allows jumping with 8 Direction movement and it's pretty simple (four sprites, two lines of code).

I put it on my dropbox for safe keeping.

https://dl.dropboxusercontent.com/u/111 ... _jump.capx
B
25
S
6
G
6
Posts: 262
Reputation: 3,690


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests