Very simple question

Get help using Construct 2

Post » Thu Jan 31, 2013 5:25 am

Hi friends, I need to create a floating sprite that represent the score when you hit something. So when I hit some objetc I want to create a object that start at colision point and move up some pixels and disapear. Whats the simplest way to do that? I already put fade behav in the object ... and I know that I can decrease Y during some time but I want to know if C2 have a simple way to do that?
Be nice with others and with yourself!
My musics: https://soundcloud.com/vinians
My C2 Forum:
http://nmbr.forumeiros.com/
My Site:
http://www.dicasebytes.com.br
B
21
S
5
G
6
Posts: 166
Reputation: 4,885

Post » Thu Jan 31, 2013 5:40 am

I would suggest the ease tween plugin (actually, its a behavior). On the collision, spawn your score sprite(which would have the ease tween behavior), and then ease tween would let you send it the direction you want and destroy it at a set time.

Sorry about all the edits, you would also generally get faster help if you post these questions in the "how to" forum.

http://www.scirra.com/forum/behavior-easetween_topic53288.htmlgazoogle2013-01-31 05:54:16
B
34
S
4
G
8
Posts: 67
Reputation: 5,857

Post » Thu Jan 31, 2013 6:25 am

You don't even need a third-part plugin.
Bullet behavior is more than enough.
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: 6,998
Reputation: 57,791

Post » Thu Jan 31, 2013 5:37 pm

Bullet doest not work because the object is not facing at the direction I need.
Be nice with others and with yourself!
My musics: https://soundcloud.com/vinians
My C2 Forum:
http://nmbr.forumeiros.com/
My Site:
http://www.dicasebytes.com.br
B
21
S
5
G
6
Posts: 166
Reputation: 4,885

Post » Thu Jan 31, 2013 5:47 pm

Then rotate the object as well to face the direction you want.
B
50
S
21
G
8
Posts: 844
Reputation: 10,299

Post » Thu Jan 31, 2013 5:52 pm

Bullet does work if you set its property "Set angle" to no like in the example.
If the direction of the bullet doesn't suit you, modify the angle of motion like in the example.
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: 6,998
Reputation: 57,791

Post » Thu Jan 31, 2013 7:21 pm

And to boot, toss the fade behavior on it and it'll fade out and destroy itself.theubie2013-01-31 19:21:31
B
26
S
8
G
3
Posts: 210
Reputation: 5,973

Post » Thu Jan 31, 2013 7:43 pm

You could use the bullet behavior on a text object that shows the score, but I think it would look ugly. Maybe you should look into sprite fonts.

http://www.scirra.com/forum/plugin-spritefont-28th-august-2012_topic45876_page1.html

edit: OR, if you're just going to show "+3" or something like that, you wouldn't need sprite font, I guess.andreyin2013-01-31 19:44:17
B
106
S
35
G
36
Posts: 796
Reputation: 24,711


Return to How do I....?

Who is online

Users browsing this forum: benajad, Braus, Google [Bot], R0J0hound, shinkan and 20 guests