how can we change jump strengths based on button hold time

Just started using Construct 2? Post your questions here

Post » Fri Jun 02, 2017 12:02 pm

Hi
How can we change the jump strength based on button holding time.I mean if i hold the button or touch for 2 seconds its jump strength should be some 500 and if you hold for 4 seconds it should be some 700(something like that)......etc etc....
Please help me
Thanks in advance.
B
23
S
8
G
1
Posts: 35
Reputation: 2,095

Post » Fri Jun 02, 2017 1:32 pm

Add an event with on key held down, and every one sec condition, and a global variable called strength = 0, increment the strength by 150 in the event.

Then add another condition on key released, and as action set the jump length to the global variable strength, and reset strength back to 0.
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest