How do I make the player a floating sprite?

Get help using Construct 2

Post » Thu Dec 31, 2015 5:19 pm

Hi! first time posting.

I just started my first game and I am trying to have the player sprite float. The character has tiny wings so it can only hover above ground. How can I make it so in game? I am using the Platformer behavior to move him.

Thanks in advance and Happy New Year!

-Vor
B
7
Posts: 4
Reputation: 287

Post » Thu Dec 31, 2015 6:01 pm

Should be no problem using a sprite with the platform behaviour and pinning your sprite to it..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Dec 31, 2015 7:23 pm

either that or you can have multiple events set the gravity of the player.
B
23
S
8
G
5
Posts: 17
Reputation: 3,598

Post » Sat Jan 02, 2016 4:13 am

Thank you @LittleStain and @kathleen, I just tried the pinning the sprite to another object and it works. However, I lost the up and down movement of the animation, I still have the wings moving but it doesnt move up and down.

Here is the .capx file https://www.dropbox.com/s/hq1qtaxv0gjgk ... .capx?dl=0

Also, what do you mean by "gravity events", would that be for setting a distinct gravity environments to the whole layout?

Again, thank you both and anyone else that jumps in. =)
B
7
Posts: 4
Reputation: 287

Post » Sat Jan 02, 2016 9:22 am

B
47
S
10
G
5
Posts: 232
Reputation: 7,561

Post » Sun Jan 03, 2016 8:26 pm

@Miu3 Thank! That actually looks pretty cool.

I played around a bit more and found this to work better for me: https://www.dropbox.com/s/r9n7wsr9ftpjv ... .capx?dl=0

The only problem I am having now is that the character sprite's collision box isn't working, not sure why?

Edit - It kinda works... If I collide with something above me, it works but I can run through a platform if its at the right height.
B
7
Posts: 4
Reputation: 287

Post » Mon Jan 04, 2016 4:34 pm

It's because of your player boxes collision polys. You can make the fly float without the player box by going into its animations and changing the collision box so that there is a ton of space underneath the fly and then applying it to the whole animation, but first you're going to want to extend the canvas size to 35 and align the fly to the center. then give the fly the controls you have on the player box so that you can move back and forth.
B
23
S
8
G
5
Posts: 17
Reputation: 3,598

Post » Mon Jan 04, 2016 7:55 pm

@kathleen Thanks you! I'll fix it tonight after I get out of work. =)
B
7
Posts: 4
Reputation: 287


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 2 guests