How do I Create a shadow and constrain it to the floor?

Just started using Construct 2? Post your questions here

Post » Wed Jan 31, 2018 10:15 am

Hi Guys,

I kinda have have two questions, and I've searched the forums, and half the links are broken and old,
and I don't find much on YouTube.

Question1: How do I make a player shadow, that is constrained to the ground when a player jumps, I thought of adding it to the sprite of the main player, but it wouldn't work if my character was doing a double jump, and I'm going to need big sprites for the player every time he jumps (which is not ideal). Thought of making a gradient oval and scale it as well as change opacity when player jumps.

Question2: I have a life pickup, which is on a separate layer in game, if my player picks up the Life Pick up, I want the life pickup to fly from where my player is and move itself to the HUD , top left of the screen?
I'm sure it possible, I just need to know how to go about doing it..? :(

Any help would be greatly appreciated !

Thank you!
B
11
S
1
Posts: 5
Reputation: 501

Post » Wed Jan 31, 2018 10:32 am

1. You can make a separate sprite for shadow and set it to (character.x, ground.y) on every tick.
But I don't know what to do if your character is jumping over a box or a gap in the ground.. Maybe use a blend mode, to make the shadow only visible when it's overlapping the floor.


2. You can do this with Bullet, but I would use MoveTo behavior:
behavior-moveto_t63156
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
157
Posts: 2,212
Reputation: 83,505

Post » Wed Jan 31, 2018 12:25 pm

Wow, Thanks for your help @dop2000...and so quick! :D
I'll check it out later today and let you know how it goes!

Thanks!
Dylan
B
11
S
1
Posts: 5
Reputation: 501


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests