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
94
S
19
G
34
Posts: 1,840
Reputation: 27,988

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
247
S
85
G
40
Posts: 7,000
Reputation: 57,805

Post » Wed May 09, 2012 12:24 am

@Kyatric thank you very much, you show me lot of interesting things! I appreciate it! :)
B
94
S
19
G
34
Posts: 1,840
Reputation: 27,988

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,400

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
94
S
19
G
34
Posts: 1,840
Reputation: 27,988

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
247
S
85
G
40
Posts: 7,000
Reputation: 57,805

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,240

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
94
S
19
G
34
Posts: 1,840
Reputation: 27,988

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
33
S
11
G
9
Posts: 381
Reputation: 10,153

Post » Thu May 17, 2012 11:04 pm

WOOW this is too very cool :D
B
94
S
19
G
34
Posts: 1,840
Reputation: 27,988

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 22 guests