How do I make objects fall?

Get help using Construct 2

Post » Mon Apr 04, 2016 4:33 am

Hi there, I am trying to create a sub-game within my game. I would like objects to fall from the sky when the player comes into contact with a bin which will then be used to catch those objects. These objects falling will only last 20 seconds or so then it will stop. I have attached the bullet behavior to the objects but don't really know where to go from here.

Any suggestions?
B
4
S
1
Posts: 11
Reputation: 316

Post » Mon Apr 04, 2016 4:41 am

You could give them the platform behavior and turn off controls. Then you can easily control their speed of fall. Just turn on and off the behavior when you want them to fall. (might not be best way to do this)

Aaron
B
13
S
4
G
1
Posts: 31
Reputation: 1,439

Post » Mon Apr 04, 2016 11:30 pm

Here's a rough example of one way to accomplish this:

https://dl.dropboxusercontent.com/u/163 ... jects.capx
B
38
S
12
G
5
Posts: 151
Reputation: 5,338

Post » Mon Apr 04, 2016 11:43 pm

Thorne wrote:Hi there, I am trying to create a sub-game within my game. I would like objects to fall from the sky when the player comes into contact with a bin which will then be used to catch those objects. These objects falling will only last 20 seconds or so then it will stop. I have attached the bullet behavior to the objects but don't really know where to go from here.

Any suggestions?


Using bullet behavior will make them move forward, which is defaulted to the right (I believe, when creating a new sprite it's angle is 0 which is to the right). So you can just change the angle to 90 but bullet behavior is really only necessary if they are moving fast. You can use platform behavior or physics behavior. If using platform behavior be sure to turn of "default controls" in the settings (or else the player will control them). If using physics behavior the objects will bounce off other physics objects. But beware with physics objects if you use a ton it will slow down.

You could even not use a behavior and make an event that moves the objects down every tick, or something similar. Can put that event in a group and disable it when minigame not in use.

So many options . . .
ImageImageImage
B
44
S
26
G
11
Posts: 518
Reputation: 10,502


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 26 guests