Jump

Get help using Construct 2

Post » Tue Feb 04, 2014 4:34 pm

Hello, I want that when my player jumps for example on the left side of the trampoline I go left, when he jumps through downtown is jumping up and when around the right side to jump to the right ...

the problem is not how to divide the trampoline in three everywhere to say jump.

B
13
S
2
Posts: 297
Reputation: 1,717

Post » Tue Feb 04, 2014 4:55 pm

you have your solution in your drawing! :)
use 3 square sprites(set them invisible of course during runtime ) and place them along your trampoline surface.then say
Player on collision with "left sprite"
and platform is falling                    set platform y -500
                                           set platform x -200
Player on collision with "center sprite"
and platform is falling                    set platform y -500
                                 
Player on collision with "right sprite"
and platform is falling                     set platform y -500
                                           set platform x 200
Roccinio2014-02-04 16:59:16
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Tue Feb 04, 2014 8:16 pm

understand, and if that trampoline move, as it would do? thx because those sprites are fixed, if the trampoline moves, not work
B
13
S
2
Posts: 297
Reputation: 1,717

Post » Tue Feb 04, 2014 10:47 pm

In the paid version of Construct 2, this issue can easily be handled with a [URL=https://www.scirra.com/manual/150/containers]Containers[URL].

In the free version of C2, when the trampoline moves, you can define each of the sprites to also move the same way. This would just take more events and actions.

@statham, but if you want more jumping direction without adding additional sprites, you could possibly get the location of where the player collision occurs, the do some maths to calculate the angle the player should bounce.danialgoodwin2014-02-04 22:49:54
B
20
S
4
G
1
Posts: 185
Reputation: 2,563

Post » Wed Feb 05, 2014 10:54 am

I want to create a game like Arkanoid but I can choose the angle and the jump of each of the three parts of the jump. but moving no idea how.
B
13
S
2
Posts: 297
Reputation: 1,717

Post » Wed Feb 05, 2014 7:24 pm

Give your ball the bullet behavior and set it to bounce off of solids. You can also use the PIN behavior to pin the 3 "bounce" sprites to the trampoline so that when it moves they move with it.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Fri Feb 07, 2014 3:17 pm

you can make a little example
B
13
S
2
Posts: 297
Reputation: 1,717

Post » Sat Feb 08, 2014 10:59 am

B
13
S
2
Posts: 297
Reputation: 1,717

Post » Sat Feb 08, 2014 11:47 am

What kind of example would help?

create three sprites give them pin behaviour
pin them to the trampoline on start of layout

Pretty basic if you ask me,
shouldn't be that hard..
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 » Sat Feb 08, 2014 3:36 pm

Have a look at breakout tutorial - in the second video ("Interactivity") this is covered.
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,832

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests