# Scripted Jump

Get help using Construct 2

### » Sat Jun 23, 2012 8:08 pm

Hello,

I'm a little new to using this tool. I've been working on game prototype, where I need to get my playable character jump scripted towards a particular direction at particular jump length.

The playable character has the platform behavior, and is colliding with an object which should make it look like it jumps from it.

How do I do it, could anyone help me here?
B
3
S
1
Posts: 7
Reputation: 764

### » Sat Jun 23, 2012 8:17 pm

You can use platform.vectorx and platform.vectory to control the jump's x (distance) and y (height) directions. Here is a thread that discusses it:

Holding down jump makes jump bigger
B
30
S
12
G
13
Posts: 281
Reputation: 12,448

### » Sat Jun 23, 2012 9:11 pm

Thanks for the reply, but that did not help me in my case.

In my game the playable character jumps on a trampoline and then jumps towards a particular angle on its own. The jump should be automatically done. The trampoline is standing on a 45 degree angle.

https://www.dropbox.com/s/vurk18x404v4mev/exp.png

Please see if u could understand, as I'm trying to do this for last two days. Thank you.mmadnani2012-06-23 21:12:54
B
3
S
1
Posts: 7
Reputation: 764

### » Sat Jun 23, 2012 9:50 pm

It's the same idea. When the player touches the trampoline, set it's x and y vectors.
vector x = cos(angle)*speed
vector y = sin(angle)*speed
where angle is the direction you want to go.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,870

### » Sat Jun 23, 2012 10:13 pm

Thanks for explaining it further, but it did not work. The playable object has the behavior of platform and the trampoline is solid.

When the object jumps on the trampoline it should automatically jumps towards a particular angle with increased jump strength.

hope this clarifies my doubt.
B
3
S
1
Posts: 7
Reputation: 764

### » Sat Jun 23, 2012 10:22 pm

Like this? bounce.capx
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,870

### » Sat Jun 23, 2012 10:47 pm

Yes..Yes..and now it is completely cleared how you did it.

Thanks a ton guys !!
B
3
S
1
Posts: 7
Reputation: 764