Gravity, anyone?

For questions about using Classic.

Post » Mon Apr 30, 2012 4:06 pm

hi, how can I add gravity to my game without adding the platform behaviour. Or at least having platform behaviour but disabling all its functions except gravity.
B
3
Posts: 9
Reputation: 343

Post » Mon Apr 30, 2012 4:25 pm

to not use a platform behavior: add a variable to the object called "drop"(or whatever) , and an always condition adding 0.09(or whatever you want the force of gravity to be) to "drop" than set y. position of the object to current y. + "drop"

if you don't mind having the platform object, and want its collision detection just set its max speed and everything else to 0, besides the falling.

--------------------------------------------------------------------------

fun with falling: if you make the falling your own event, you can have the object bounce by setting its "drop" to the current ("drop"/2)*-1 when it overlaps a solid object.Bartosh2012-04-30 16:27:26
B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Tue May 01, 2012 3:27 pm

whoa that helped, thanks Bartosh
B
3
Posts: 9
Reputation: 343


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests