Make object hover after throw

Get help using Construct 2

Post » Tue Feb 14, 2012 10:47 am

http://dl.dropbox.com/u/23570533/throw2.capx

Hi Guys,

I was wondering if it is possible to make the following feature: after having thrown an object, make it hover in the air for a second or four before falling to the ground. A right mouse click should then make it fall instantly

I tried working with gravity but it doesnt seem to really do the trick.

The idea would be to build a small platform game, where the player has to set his own stepping blocks by throwing them to get to a destination.

Any tips ?

Grtz,

J.
B
4
Posts: 17
Reputation: 434

Post » Tue Feb 14, 2012 11:04 am

I'll try to teach you the easiest way.

Make an invisible sprite, bigger than your object, call it as "detector". Use platform, bullet or 8 ways behaviors here. Setup the gravity for 0 if using platform, so, it will hover and not fall.

Pin your object to your detector.

When the detector is overlapping the Ground Families (I strong recommend you use Families with all your ground and wall objects inside), maintain his direction in line, like you want (8ways behavior is the best for it, but bullet can work like a charm too).

The bigger your detector, high and far from walls your object will be.
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,212
Reputation: 18,482

Post » Thu Feb 16, 2012 3:19 pm

Something like this?

throw2_edited.capx
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Fri Feb 17, 2012 5:11 pm

@Nimtrix, thanks a lot !! I was struggeling with it for a couple of days and didn't want to bother the locals too much, I came close but your solution is a lot easier and cleaner. It was just what I was looking for.

janajost2012-02-17 17:46:13
B
4
Posts: 17
Reputation: 434


Return to How do I....?

Who is online

Users browsing this forum: flemmig, MisterAqua and 29 guests