how do i press double A to double punch

Get help using Construct 2

Post » Thu Aug 16, 2012 11:23 pm

Delta Time, it's a feature inside the engine. Delta time means a space of time between 2 point in a time line.

You can reproduce your request following this procedure:

- Create a number variable inside your instance (instance is the sprite object) and call it as "combo";
|- On keyboard "A" is pressed (for example);
|- If "combo" = 0;
-- Play the animation "punching1"
-- Add 1 to "combo";
- On animation "punching1" is finished:
-- Set "combo" to 0;
|- If "combo" = 1;
|- On keyboard "A" is pressed;
-- Play the animation "punching2"
-- Add 1 to "combo";


You can loop it, make different animations for each stage of the combo, or just repeat the combo animations, this way:


|- If "combo" > 0;
|- On keyboard "A" is pressed;
#when you have one animation for each combo sequence;
-- Play the animation "punching" & player.variable.combo;
#when you have two animation at all;
-- Play the animation "punching" & random(1,2);
-- Add 1 to "combo";

Don't miss to reset the "combo" variable to 0 when the "A" is not pressed by 1 or 2 seconds.

That's it. ^^TELLES08082012-08-17 03:52:46
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,213
Reputation: 18,484

Post » Thu Aug 16, 2012 11:23 pm

you can use the neat search function on the upper right corner of the page
heres a link with more details about dt ;]
http://www.scirra.com/tutorials/67/delta-time-and-framerate-independence/page-1
sheepy2012-08-16 23:23:58
B
38
S
8
G
3
Posts: 438
Reputation: 6,869

Post » Fri Aug 17, 2012 12:43 am

Telle = its not working!!

sheepy = thx! i appreciate that.. i did the tutorial
B
16
S
3
Posts: 17
Reputation: 1,005

Post » Fri Aug 17, 2012 1:14 am

@rory, ive been trying to make urs but i fail

this is my example .capx

CAPX
B
16
S
3
Posts: 17
Reputation: 1,005

Previous

Return to How do I....?

Who is online

Users browsing this forum: ibrahimtolaj, Unconnected, Yahoo [Bot] and 16 guests