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
24
S
4
G
2
Posts: 318
Reputation: 2,446

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! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

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
50
S
21
G
8
Posts: 844
Reputation: 10,299


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests