How do I Variable Jumpstrenght

Get help using Construct 2

Post » Sun Mar 16, 2014 8:44 am

Hi everyone !

i'm currently trying to finish my character gameplay ! but i've got some problem, due also i guess to the touch configuration

1 - My character should Jump with a variable jumpstrenght depending of how many time, you stay holding intouch.

The thing is, as i have set on "on any touch start" -> character Jump,

i don't know how having a robust system who calculate the correct jumpstrenght in real time during the same time i touch the screen. However there i have also seen something who stop the vector Y on anytouch end, but the problem is , in this case, the jump not look smooth during the fall it's not a natural curved line.

thanks for your help
B
4
G
1
Posts: 35
Reputation: 595

Post » Sun Mar 16, 2014 8:51 am

i'm working/thinking on it, Maybe if i could be able to stop the vector Y "on any touch end" during a jump it could be a good alternative, like that i set a higher jumpstrenght value (the max), but i don't know if it's possible
B
4
G
1
Posts: 35
Reputation: 595

Post » Sun Mar 16, 2014 9:13 am

Make a capx whit basic for recreate your scene so the most veteran or experience users will have more easy help you...
B
17
S
5
G
2
Posts: 173
Reputation: 2,085

Post » Sun Mar 16, 2014 10:36 am

here is a starting point for you to try

hold, pause then release left mouse button to jump...

first press records time
release works out time mouse held
time held*1000 (in this case) sets the jump strength
simulate jump command

using latest beta - found at bottom of most pages under download
You do not have the required permissions to view the files attached to this post.
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
34
G
47
Posts: 1,194
Reputation: 30,882

Post » Sun Mar 16, 2014 6:12 pm

Firs tat all Thanks RamPackWobble for your time,

The things is with your solution even if it work nicely, it's not the kind of behavior i was expected.
after some test, i need to make in sort to stop the Vector Y on any touch end after a jump.

do you have any idea ?

thanks again for your help
B
4
G
1
Posts: 35
Reputation: 595

Post » Mon Mar 17, 2014 8:32 am

Try - (not tested)

if sprite (jump) touched simulate jump button

if sprite button not pressed
and
player is jumping---- set Y vector to 0
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
34
G
47
Posts: 1,194
Reputation: 30,882


Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot], Kin, ratboy3, tinhofiel and 45 guests