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
44
S
13
G
7
Posts: 603
Reputation: 7,936

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
63
S
24
G
4
Posts: 201
Reputation: 6,862


Return to How do I....?

Who is online

Users browsing this forum: clehax, doiangkhang, imhotep22 and 10 guests