Variable Player Box Size for "Ducking Behavior"

Get help using Construct 2

Post » Sun Apr 28, 2013 4:43 am

I was wondering if there was any way to shrink the player box in a platformer to match a ducking animation. In other words, if a character ducks under a projecile, the player box is the same so he still would get hit. I would like to know if I need to create a wholly different player object.

Thanks
B
4
Posts: 13
Reputation: 228

Post » Sun Apr 28, 2013 4:47 am

I'm guessing you have a hitbox for the player and an object for the visual side of the player. If that's true you could just do every tick -> set hitbox size to player size
B
40
S
12
G
7
Posts: 603
Reputation: 7,656

Post » Sun Apr 28, 2013 7:14 am

I would set the height of the hitbox to half of what it normally is when the down key is pressed - example here

https://dl.dropboxusercontent.com/u/70305965/crouch.capx
B
47
S
16
G
3
Posts: 134
Reputation: 4,982


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, gregorysforster, onzephyr and 2 guests