Easiest method to have sprites "fall in"?

Get help using Construct 2

Post » Sat Feb 15, 2014 12:16 am

Hi,

What is the best practice to achieve the effect of sprites and other objects falling or dropping into the layout?

Would it be to give the object a bullet behaviour and set it's gravity level to a high value?

Or is there another prefered method?
B
7
S
2
Posts: 110
Reputation: 927

Post » Sat Feb 15, 2014 12:43 am

Close; bullet, and set the sprite angel to 90, speed to ___.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Sat Feb 15, 2014 12:59 am

Depending on what effect you're going for, physics behaviors work equally well. Plus, you don't have to worry about what direction it's moving to make it look like it's falling.

The only problems you might run into is their collisions with other physics objects/solids and the unpredictability once they hit things.
B
15
S
4
G
1
Posts: 169
Reputation: 2,179

Post » Sat Feb 15, 2014 1:24 am

[QUOTE=blackhornet] Close; bullet, and set the sprite angel to 90, speed to ___.[/QUOTE [QUOTE=blackhornet] Close; bullet, and set the sprite angel to 90, speed to ___.[/QUOTE]

"Close" Where is this option and what is it's function?

Currently the sprite passes through objects on the same layer even though i have them set as "Soild" unless i set my falling sprite to "Bounce off solid objects" but then it bounces non stop.

Can i have it bounce a few times and then come to a complete stop?

Is this what the "Close" will do?]
B
7
S
2
Posts: 110
Reputation: 927

Post » Sat Feb 15, 2014 1:31 am

It sounds like you do want physics after all, not Bullet.

(You misunderstood what 'close' meant - ignore it).
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Sat Feb 15, 2014 1:47 am

So it's not possible to have an item fall and then just stop or bounce off a solid it encounters and stop by using the "Bullet" behaviour?
B
7
S
2
Posts: 110
Reputation: 927

Post » Sat Feb 15, 2014 7:51 am

In the past I did something like:(Put into a group so it can be turned off when no longer needed)

spritefalling is the falling boxes - set to bullet speed 0, gravity high (500 ?), bounce off solid ON, set direction ON

spriteground is the ground - set to solid

spritefallin on collision with ground : set spritefalling.bulletspeed to spritefalling.bulletspeed*0.5


and that gave an okish result...

August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,882

Post » Sat Feb 15, 2014 8:17 am

Not sure i understand what you mean, it bounces forever never coming to a stop.

I just want the sprite to move down the screen, bounce and then stop.

Or fail that just move down and stop.

There must be something i'm missing..

Edit: Ok i managed to make the sprite fall down by adding the "platform" behaviour and i can make it stop by hitting another sprite, now, is there a way i can make it bounce up a few times before settiling down?mist2014-02-15 09:10:04
B
7
S
2
Posts: 110
Reputation: 927

Post » Sat Feb 15, 2014 9:08 am

This is along the lines I did before - but this time I've added extra falling things.

capx

try disabling event 5 to 8 - so only one is enabled at a time for different effects.

event 5 would also need families adding to allow for collision with other boxes ?

Anyway - just an idea if you still want to go with bullet.

In the original (lost) capx it was just a single "logo" sprite so there was no need for families and I didn't think about self collision till I tried this test....

RamPackWobble2014-02-15 09:10:28
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,882

Post » Sat Feb 15, 2014 9:12 am

Cool, i am using the "platform" behaviour now and it's working, as in falling down and stopping when it hits another sprite, but i can't figure out how to make it bounce up a few times before coming to rest!

Any ideas?
B
7
S
2
Posts: 110
Reputation: 927

Next

Return to How do I....?

Who is online

Users browsing this forum: TRMG and 34 guests