Super mario gravity help

New releases and general discussions.

Post » Wed Nov 07, 2012 9:27 pm

Hi i need help with super mario game. I do not know how to use gravity on mushroom and enemies.... Mushroom and enemies go left and right but how to create gravity? For example enemy or mushroom fall to hole...

pls help
B
25
S
4
G
2
Posts: 318
Reputation: 2,481

Post » Wed Nov 07, 2012 9:38 pm

Are you using any behaviors on the enemies or just moving them from events?

If so, you can have an event "For Each Object" from the System events and select the object you want to fall, then add a condition saying "Is overlapping" and select your ground object or the "Solid" attribute.

Next, right click this condition and choose "Invert". You can then add an event to increase the Y position of your object by a few pixels (eg: 5, or 10 for a faster fall speed)
"Construct 4 lets YOU make advanced games! (but not play them)" Construct Classic - Examples Kit
B
107
S
38
G
17
Posts: 2,169
Reputation: 18,933

Post » Thu Nov 08, 2012 12:24 am

If you are using the platform behavior on enemies/mushrooms you can use the Sprite -> "simulate control" -> move left action to make them move. That way, gravity is built in.
B
72
S
33
G
11
Posts: 932
Reputation: 13,768


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests