Floating on water with Platform behavior

Get help using Construct 2

Post » Fri Sep 20, 2013 9:36 am

Hi
Does anyone know how I might go about making a character controlled by the platform behaviour appear to float on the surface of some water?

what I'm trying to create is a setup where if the player has an item they will sink, but if not then they will just bob up and down on the surface.

B
6
S
2
G
1
Posts: 52
Reputation: 1,347

Post » Fri Sep 20, 2013 10:37 am

You could create an invisible solid platform with sine behaviour so when the player is on it they will appear to bob up and down. plinkie2013-09-20 10:37:44
B
46
S
16
G
74
Posts: 2,088
Reputation: 44,185

Post » Fri Sep 20, 2013 10:52 am

I'd suggest something like: If the player is overlapping the water, set platformer gravity to zero unless the item is held (check a variable). The bobbing motion can be achieved with the Sine behaviour.
B
57
S
15
G
11
Posts: 912
Reputation: 12,606


Return to How do I....?

Who is online

Users browsing this forum: darkrealos, dop2000, Rhindon and 25 guests