How do a slash effect

Get help using Construct 2

Post » Tue May 08, 2012 9:06 pm

like in fruit ninja.


how create that kind of effect.
Prabably when hold left mouse button and move cursor create long or short slash delgado2012-05-08 21:07:12
B
98
S
22
G
36
Posts: 1,849
Reputation: 29,406

Post » Wed May 09, 2012 12:08 am

Commented example capx

This is mostly like drawing a line and playing an animation in the end.
With a bit of thinking about the events.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
253
S
87
G
42
Posts: 7,039
Reputation: 59,293

Post » Wed May 09, 2012 12:24 am

@Kyatric thank you very much, you show me lot of interesting things! I appreciate it! :)
B
98
S
22
G
36
Posts: 1,849
Reputation: 29,406

Post » Wed May 09, 2012 1:20 am

The real trick is making it curve! Very difficult!!
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,455

Post » Wed May 09, 2012 8:42 am

@Kyatric i have one (maybe simple) question, how compare a dostance of slash if i want add sound. If slash is short- short sound and if its long- long sound ?
B
98
S
22
G
36
Posts: 1,849
Reputation: 29,406

Post » Wed May 09, 2012 8:47 pm

@delgado: I guess on "touch release" you can add subevents that will test dash.width

If dash.width < X => Play sound1
If dash.width > X and <Y => Play sound2
if dash.width > Y => Play sound3

Something like that.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
253
S
87
G
42
Posts: 7,039
Reputation: 59,293

Post » Wed May 09, 2012 9:48 pm

In fruit ninja slash sound is played even if you keep finger on the screen after the slash (no released touch event) and also begins when the slash start ... so perhaps it's more something about velocity checking ... and so need checking the range between previous and actual touch X/Y to give short or long sound ! it's not so easy and it's perhaps done with a lot of very small sounds playing after each others or a single sound but changing the playing speed of the sound itself !

Good luck, and i think many guys need this kind of effect so it's a really interesting post ;-pnaelian2012-05-09 21:55:27
B
16
S
5
G
3
Posts: 298
Reputation: 5,275

Post » Wed May 09, 2012 10:24 pm

I try with Height and Width before but if you said that i try one time
B
98
S
22
G
36
Posts: 1,849
Reputation: 29,406

Post » Thu May 17, 2012 10:50 pm

Hi, i picked up some old example from ROJOHound for something totally different and i got this.Fruit ninja slash

It can be better if you can finetune the Heigth for different distances from touch to Touchend.cesisco2012-05-17 22:51:01
B
34
S
11
G
9
Posts: 386
Reputation: 10,196

Post » Thu May 17, 2012 11:04 pm

WOOW this is too very cool :D
B
98
S
22
G
36
Posts: 1,849
Reputation: 29,406

Next

Return to How do I....?

Who is online

Users browsing this forum: MisterAqua, Zarocks and 22 guests